httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1770396 - in /httpd/test/mod_h2/trunk: conf/sites/test.example.org.conf htdocs/test.example.org/necho.py test/test.sh test/test_common.sh test/test_interim.sh test/test_intermediates.sh test/test_proxy.sh test/test_push.sh
Date Fri, 18 Nov 2016 15:19:20 GMT
Author: icing
Date: Fri Nov 18 15:19:20 2016
New Revision: 1770396

URL: http://svn.apache.org/viewvc?rev=1770396&view=rev
Log:
new push/intermediate tests

Added:
    httpd/test/mod_h2/trunk/test/test_interim.sh
      - copied, changed from r1770395, httpd/test/mod_h2/trunk/test/test_intermediates.sh
Removed:
    httpd/test/mod_h2/trunk/test/test_intermediates.sh
Modified:
    httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf
    httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py
    httpd/test/mod_h2/trunk/test/test.sh
    httpd/test/mod_h2/trunk/test/test_common.sh
    httpd/test/mod_h2/trunk/test/test_proxy.sh
    httpd/test/mod_h2/trunk/test/test_push.sh

Modified: httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf?rev=1770396&r1=1770395&r2=1770396&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf (original)
+++ httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf Fri Nov 18 15:19:20 2016
@@ -110,8 +110,34 @@
         H2PushResource "/006/006.css" critical
         H2PushResource "/006/006.js"
     </Location>    
+    <Location /permanent/006-push.html>
+        H2PushResource "/006-push.html"
+    </Location>
     </IfVersion>
 
+    RewriteRule ^/.*necho.py(.*) /necho.py$1 [PT]
+    <Location /006-pushfile.html>
+        H2PushResource "/006/006.css" critical
+        H2PushResource "/006/006.js"
+    </Location>
+    <Location /x1necho.py>
+        H2PushResource "/006/006.css" critical
+        H2PushResource "/006/006.js"
+    </Location>
+    <Location /proxy/006-pushfile.html>
+        H2PushResource "/006/006.css" critical
+        H2PushResource "/006/006.js"
+    </Location>
+    <Location /006-pushfile-headers.html>
+        Header add Link "</006/006.css>;rel=preload"
+        Header add Link "</006/006.js>;rel=preload"
+    </Location>
+    <Location /necho.py>
+        Header add Link "</006/006.css>;rel=preload"
+        Header add Link "</006/006.js>;rel=preload"
+    </Location>
+
+
     <Location /hello.py>
         SSLOptions +StdEnvVars
     </Location>

Modified: httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py?rev=1770396&r1=1770395&r2=1770396&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py (original)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py Fri Nov 18 15:19:20 2016
@@ -31,7 +31,7 @@ Content-Type: text/html\n
 except KeyError:
     print "Status: 200 Ok"
     print """\
-    Content-Type: text/html\n
+Content-Type: text/html\n
     <html><body>
     Echo <form method="POST" enctype="application/x-www-form-urlencoded">
     <input type="text" name="count">

Modified: httpd/test/mod_h2/trunk/test/test.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test.sh?rev=1770396&r1=1770395&r2=1770396&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test.sh (original)
+++ httpd/test/mod_h2/trunk/test/test.sh Fri Nov 18 15:19:20 2016
@@ -58,10 +58,10 @@ $SHELL "$TEST_DIR"/test_header.sh      $
 $SHELL "$TEST_DIR"/test_debug.sh       $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_push.sh        $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_push.sh        $HTTP_AUTH                             &&
-$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH                          &&
-$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/proxy                    &&
-$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/rewrite                  &&
-$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH_SER                 || fail
+$SHELL "$TEST_DIR"/test_interim.sh     $HTTPS_AUTH                            &&
+$SHELL "$TEST_DIR"/test_interim.sh     $HTTPS_AUTH/proxy                      &&
+$SHELL "$TEST_DIR"/test_interim.sh     $HTTPS_AUTH/rewrite                    &&
+$SHELL "$TEST_DIR"/test_interim.sh     $HTTPS_AUTH_SER                   || fail
 
 $SHELL "$TEST_DIR"/test_nghttp_get.sh  $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTPS_AUTH                            &&

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=1770396&r1=1770395&r2=1770396&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Fri Nov 18 15:19:20 2016
@@ -444,6 +444,19 @@ curl_check_necho() {
     echo ok.
 }
 
+curl_check_status() {
+    DOC="$1"; shift
+    MSG="$1"; shift
+    echo -n " * curl status $MSG..."
+    rm -rf $TMP
+    mkdir -p $TMP
+    cat > $TMP/expected
+    ${CURL} -D - "$@" --data 'XYZ' ${URL_PREFIX}/${DOC} >$TMP/response || fail "retrieval
failed"
+    fgrep "HTTP/2 " < $TMP/response >$TMP/status
+    diff -b $TMP/expected $TMP/status || fail
+    echo ok.
+}
+
 curl_post_file() {
     local DOC="$1"; shift;
     local FILE="$1"; shift;

Copied: httpd/test/mod_h2/trunk/test/test_interim.sh (from r1770395, httpd/test/mod_h2/trunk/test/test_intermediates.sh)
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_interim.sh?p2=httpd/test/mod_h2/trunk/test/test_interim.sh&p1=httpd/test/mod_h2/trunk/test/test_intermediates.sh&r1=1770395&r2=1770396&rev=1770396&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_intermediates.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_interim.sh Fri Nov 18 15:19:20 2016
@@ -16,19 +16,6 @@
 
 source $(dirname $0)/test_common.sh
 
-curl_check_status() {
-    DOC="$1"; shift
-    MSG="$1"; shift
-    echo -n " * curl status $MSG..."
-    rm -rf $TMP
-    mkdir -p $TMP
-    cat > $TMP/expected
-    ${CURL} -D - "$@" --data 'XYZ' ${URL_PREFIX}/${DOC} >$TMP/response || fail "retrieval
failed"
-    fgrep "HTTP/2 " < $TMP/response >$TMP/status
-    diff -b $TMP/expected $TMP/status || fail
-    echo ok.
-}
-
 if min_httpd_version 2.4.24; then
     echo "test 100-continue on $URL_PREFIX"
     

Modified: httpd/test/mod_h2/trunk/test/test_proxy.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_proxy.sh?rev=1770396&r1=1770395&r2=1770396&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_proxy.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_proxy.sh Fri Nov 18 15:19:20 2016
@@ -120,8 +120,8 @@ large-upload() {
 }
 
 if min_httpd_version 2.4.21; then
-$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/h2proxy                  &&
-$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/h2proxy-rewrite          &&
+$SHELL "$TEST_DIR"/test_interim.sh       $HTTPS_AUTH/h2proxy                  &&
+$SHELL "$TEST_DIR"/test_interim.sh       $HTTPS_AUTH/h2proxy-rewrite          &&
 large-upload $HTTPS_AUTH/h2cproxy                                             &&
 large-upload $HTTPS_AUTH/h2proxy                                              &&
 $SHELL "$TEST_DIR"/test_nghttp_get.sh  $HTTPS_AUTH/h2cproxy-rewrite           &&

Modified: httpd/test/mod_h2/trunk/test/test_push.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_push.sh?rev=1770396&r1=1770395&r2=1770396&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_push.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_push.sh Fri Nov 18 15:19:20 2016
@@ -192,11 +192,19 @@ EOF
     if min_httpd_version 2.4.24; then
         # test H2PushResource directive and 103 response support
         
-        nghttp_check_pushed 006-push9.html "push9" <<EOF
+        nghttp_check_pushed 006-push9.html "push9 (GET)" <<EOF
 /006-push9.html 543 200
 /006/006.css 216 200 pushed
 /006/006.js 839 200 pushed
 EOF
+
+rm -rf $GEN/push-data
+cat > $GEN/push-data <<EOF
+This is upload data.
+EOF
+        nghttp_check_pushed 006-push9.html "push9 (POST)" --data=$GEN/push-data <<EOF
+/006-push9.html 543 200
+EOF
         nghttp_check_pushed proxy/006-push9.html "push9 via h1 proxy" <<EOF
 /proxy/006-push9.html 543 200
 EOF
@@ -211,6 +219,21 @@ EOF
 /006/006.js 839 200 pushed
 EOF
     
+        case "$URL_PREFIX" in
+            https://*)
+                curl_check_status 006-push9.html "no expect, 103" <<EOF
+HTTP/2 103
+HTTP/2 200
+EOF
+                curl_check_status 006-push9.html "expect, no 103" -H 'Expect: 100-continue'
<<EOF
+HTTP/2 100
+HTTP/2 200
+EOF
+                ;;
+            *)
+                # ignored for http:
+                ;;
+        esac
     else
         echo "H2PushResource tests require httpd >= 2.4.24"
     fi



Mime
View raw message