httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1758002 - in /httpd/test/mod_h2/trunk: configure.ac test/test.sh test/test_common.sh test/test_header.sh test/test_intermediates.sh
Date Sat, 27 Aug 2016 12:04:04 GMT
Author: icing
Date: Sat Aug 27 12:04:04 2016
New Revision: 1758002

URL: http://svn.apache.org/viewvc?rev=1758002&view=rev
Log:
adding test for new INVALID_HEADER checks

Modified:
    httpd/test/mod_h2/trunk/configure.ac
    httpd/test/mod_h2/trunk/test/test.sh
    httpd/test/mod_h2/trunk/test/test_common.sh
    httpd/test/mod_h2/trunk/test/test_header.sh
    httpd/test/mod_h2/trunk/test/test_intermediates.sh

Modified: httpd/test/mod_h2/trunk/configure.ac
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/configure.ac?rev=1758002&r1=1758001&r2=1758002&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/configure.ac (original)
+++ httpd/test/mod_h2/trunk/configure.ac Sat Aug 27 12:04:04 2016
@@ -52,7 +52,7 @@ AC_ARG_WITH([serverdir], [AS_HELP_STRING
     [Use serverdir directory for setup [default=gen/apache]])],
     [request_serverdir=$withval], [request_serverdir=$PWD/gen/apache])
 
-NGHTTP2_VERSION=1.13.0
+NGHTTP2_VERSION=1.14.0
 
 AC_ARG_WITH([nghttp2-version], [AS_HELP_STRING([--with-nghttp2-version],
     [Use nghttp2 of specified version [default=<ignore>]])],

Modified: httpd/test/mod_h2/trunk/test/test.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test.sh?rev=1758002&r1=1758001&r2=1758002&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test.sh (original)
+++ httpd/test/mod_h2/trunk/test/test.sh Sat Aug 27 12:04:04 2016
@@ -75,6 +75,7 @@ $SHELL "$TEST_DIR"/test_proto_order.sh $
 $SHELL "$TEST_DIR"/test_alt_host.sh    $HTTPS_AUTH $HTTPS_AUTH_2              &&
 $SHELL "$TEST_DIR"/test_ssl.sh         $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_upgrade.sh     $HTTP_AUTH  $HTTPS_AUTH                &&
+$SHELL "$TEST_DIR"/test_header.sh      $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH                     || fail
 
 $SHELL "$TEST_DIR"/test_nghttp_get.sh  $HTTPS_AUTH                            &&
@@ -108,7 +109,6 @@ $SHELL "$TEST_DIR"/test_nghttp_get.sh  $
 $SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTP_AUTH                             &&
 $SHELL "$TEST_DIR"/test_curl_get.sh    $HTTP_AUTH                             &&
 $SHELL "$TEST_DIR"/test_curl_post.sh   $HTTP_AUTH                             &&
-$SHELL "$TEST_DIR"/test_header.sh      $HTTP_AUTH                             &&
 $SHELL "$TEST_DIR"/test_push.sh        $HTTP_AUTH                             &&
 $SHELL "$TEST_DIR"/test_trailer.sh     $HTTP_AUTH                             &&
 $SHELL "$TEST_DIR"/test_nghttp_get.sh  $HTTP_AUTH direct                      &&

Modified: httpd/test/mod_h2/trunk/test/test_common.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_common.sh?rev=1758002&r1=1758001&r2=1758002&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Sat Aug 27 12:04:04 2016
@@ -383,6 +383,18 @@ curl_check_content() {
     echo ok.
 }
 
+curl_check_fail() {
+    local DOC="$1"; shift;
+    local MSG="$1"; shift;
+    rm -rf $TMP
+    mkdir -p "$(dirname $TMP/$DOC)"
+    cat > $TMP/expected
+    echo -n " * curl /$DOC: $MSG..."
+    ${CURL} "$@" $URL_PREFIX/$DOC >$TMP/$DOC 2>&1 && fail "succeeded unexpectedly"
+    diff  $TMP/expected $TMP/$DOC || fail
+    echo ok.
+}
+
 curl_check_redir() {
     local DOC="$1"; shift;
     local REF_DOC="$1"; shift;

Modified: httpd/test/mod_h2/trunk/test/test_header.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_header.sh?rev=1758002&r1=1758001&r2=1758002&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_header.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_header.sh Sat Aug 27 12:04:04 2016
@@ -30,4 +30,14 @@ mh2fuzz_check_results / "request with Ho
 1/0/0/0/0 (2/3/4/5/0xx)
 EOF
 
+if min_httpd_version 2.4.24; then
+NGH2_VERSION=$( $NGHTTP --version )
+NGH2_VERSION=${NGH2_VERSION##*/}
+
+if min_version 1.14.0 $NGH2_VERSION; then
+  curl_check_fail index.html "invalid header" -D - -H 'x x: 1'  << EOF
+EOF
+fi
+fi
+
 fi
\ No newline at end of file

Modified: httpd/test/mod_h2/trunk/test/test_intermediates.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_intermediates.sh?rev=1758002&r1=1758001&r2=1758002&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_intermediates.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_intermediates.sh Sat Aug 27 12:04:04 2016
@@ -23,8 +23,9 @@ curl_check_status() {
     rm -rf $TMP
     mkdir -p $TMP
     cat > $TMP/expected
-    ${CURL} -D - "$@" ${URL_PREFIX}/index.html | fgrep "HTTP/2 " > $TMP/status
-    diff -b $TMP/expected $TMP/status || exit 1
+    ${CURL} -D - "$@" ${URL_PREFIX}/index.html >$TMP/response || fail "retrieval failed"
+    fgrep "HTTP/2 " < $TMP/response >$TMP/status
+    diff -b $TMP/expected $TMP/status || fail
     echo ok.
 }
 



Mime
View raw message