You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2016/11/13 21:50:55 UTC
svn commit: r1769552 - in /httpd/test/mod_h2/trunk: conf/ conf/sites/
htdocs/test.example.org/ test/
Author: icing
Date: Sun Nov 13 21:50:54 2016
New Revision: 1769552
URL: http://svn.apache.org/viewvc?rev=1769552&view=rev
Log:
new push tests
Removed:
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push.html
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push2.html
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push3.html
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push4.html
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push5.html
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push6.html
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push7.html
httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push8.html
Modified:
httpd/test/mod_h2/trunk/conf/httpd.conf
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_push.sh
Modified: httpd/test/mod_h2/trunk/conf/httpd.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/httpd.conf?rev=1769552&r1=1769551&r2=1769552&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/httpd.conf (original)
+++ httpd/test/mod_h2/trunk/conf/httpd.conf Sun Nov 13 21:50:54 2016
@@ -78,7 +78,10 @@ DocumentRoot "SUBST_SERVER_ROOT_SUBST/ht
ProxyTimeout 30
SSLProxyEngine on
<Proxy "balancer://http-local">
- BalancerMember "http://127.0.0.1:SUBST_PORT_HTTP_SUBST"
+ BalancerMember "http://test.example.org:SUBST_PORT_HTTP_SUBST"
+ </Proxy>
+ <Proxy "balancer://https-local">
+ BalancerMember "https://test.example.org:SUBST_PORT_HTTPS_SUBST"
</Proxy>
</IfModule>
@@ -143,6 +146,9 @@ DocumentRoot "SUBST_SERVER_ROOT_SUBST/ht
<Proxy "balancer://h2c-local">
BalancerMember "h2c://test.example.org:SUBST_PORT_HTTP_SUBST"
</Proxy>
+ <Proxy "balancer://nghttp2">
+ BalancerMember "h2://nghttp2.org"
+ </Proxy>
</IfModule>
################################################################################
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=1769552&r1=1769551&r2=1769552&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 Sun Nov 13 21:50:54 2016
@@ -33,14 +33,17 @@
Timeout 2
KeepAliveTimeout 10
+ ProxyTimeout 10
SSLEngine on
SSLCertificateFile conf/ssl/test.example.org.pem
SSLCertificateKeyFile conf/ssl/test.example.org.key
+ RedirectMatch 301 "/permanent(.*)" "$1"
+ RedirectMatch 302 "/temporary(.*)" "$1"
+
RewriteEngine on
RewriteRule ^/latest.tar.gz$ /xxx-1.0.2a.tar.gz [R=302,NC]
- ProxyTimeout 10
<IfModule http2_module>
H2Direct on
@@ -56,6 +59,7 @@
</Location>
</IfVersion>
+ RewriteRule ^/006-push(.*)?\.html$ /006.html
<Location /006-push.html>
Header add Link "</006/006.css>;rel=preload"
Header add Link "</006/006.js>;rel=preloadX"
@@ -96,17 +100,24 @@
Header add Link "</apache.org-files/synapse.jpg>;rel=preload"
Header add Link "</apache.org-files/ant.jpg>;rel=preload"
</Location>
-
+
+ <IfVersion >= 2.4.24>
+ <Location /006-push9.html>
+ H2PushResource "https://test.example.org:SUBST_PORT_HTTPS_SUBST/006/006.css" critical
+ H2PushResource "/006/006.js"
+ </Location>
+ <Location /proxy/006-push10.html>
+ H2PushResource "/006/006.css" critical
+ H2PushResource "/006/006.js"
+ </Location>
+ </IfVersion>
+
<Location /hello.py>
SSLOptions +StdEnvVars
</Location>
- <Proxy "balancer://https-local">
- BalancerMember "https://test.example.org:SUBST_PORT_HTTPS_SUBST"
- </Proxy>
ProxyPass "/proxy" "balancer://https-local"
ProxyPassReverse "/proxy" "balancer://https-local"
-
# proxy rewrite
RewriteRule /rewrite(.*) https://test.example.org:SUBST_PORT_HTTPS_SUBST$1 [P]
# internal redirect rewrite
@@ -118,7 +129,6 @@
Order allow,deny
Allow from all
</Location>
- ProxyPass /zeit http://www.zeit.de:80 max=20 ttl=120 retry=300
<Location "/.well-known/h2/state">
SetHandler http2-status
@@ -151,6 +161,8 @@
ProxyPass "/h2cproxy" "balancer://h2c-local"
ProxyPassReverse "/h2cproxy" "balancer://h2c-local"
RewriteRule /h2cproxy-rewrite(.*) h2c://test.example.org:SUBST_PORT_HTTP_SUBST$1 [P]
+ ProxyPass "/nghttp2" "balancer://nghttp2"
+ ProxyPassReverse "/nghttp2" "balancer://nghttp2"
</IfModule>
<IfVersion >= 2.4.19>
@@ -172,19 +184,13 @@
RewriteEngine on
RewriteRule ^/latest.tar.gz$ /xxx-1.0.2a.tar.gz [R=302,NC]
- ProxyPass "/proxy" "balancer://http-local"
- ProxyPassReverse "/proxy" "balancer://http-local"
- # proxy rewrite
- RewriteRule /rewrite(.*) http://test.example.org:SUBST_PORT_HTTP_SUBST$1 [P]
- # internal redirect rewrite
- RewriteRule /redirect(.*) $1 [PT]
-
<IfVersion >= 2.4.24>
<Location /006>
H2CopyFiles On
</Location>
</IfVersion>
+ RewriteRule ^/006-push(.*)?\.html$ /006.html
<Location /006-push.html>
Header add Link "</006/006.css>;rel=preload"
Header add Link "</006/006.js>;rel=preloadX"
@@ -226,6 +232,24 @@
Header add Link "</apache.org-files/ant.jpg>;rel=preload"
</Location>
+ <IfVersion >= 2.4.24>
+ <Location /006-push9.html>
+ H2PushResource "http://test.example.org:SUBST_PORT_HTTP_SUBST/006/006.css" critical
+ H2PushResource "/006/006.js"
+ </Location>
+ <Location /proxy/006-push10.html>
+ H2PushResource "/006/006.css" critical
+ H2PushResource "/006/006.js"
+ </Location>
+ </IfVersion>
+
+ ProxyPass "/proxy" "balancer://http-local"
+ ProxyPassReverse "/proxy" "balancer://http-local"
+ # proxy rewrite
+ RewriteRule /rewrite(.*) http://test.example.org:SUBST_PORT_HTTP_SUBST$1 [P]
+ # internal redirect rewrite
+ RewriteRule /redirect(.*) $1 [PT]
+
<IfModule proxy_http2_module>
ProxyPass "/h2proxy" "balancer://h2-local"
ProxyPassReverse "/h2proxy" "balancer://h2-local"
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=1769552&r1=1769551&r2=1769552&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 Sun Nov 13 21:50:54 2016
@@ -23,7 +23,7 @@ Content-Type: text/plain\n"""
else:
print "Status: 400 Parameter Missing"
print """\
- Content-Type: text/html\n
+Content-Type: text/html\n
<html><body>
<p>No count was specified: %s</p>
</body></html>""" % (count.value,)
Modified: httpd/test/mod_h2/trunk/test/test.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test.sh?rev=1769552&r1=1769551&r2=1769552&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test.sh (original)
+++ httpd/test/mod_h2/trunk/test/test.sh Sun Nov 13 21:50:54 2016
@@ -49,25 +49,6 @@ min_version2()
return 1
}
-export TEST_GO=no
-case "$(type -p go)" in
- *go)
- goversion=$(go version)
- goversion=${goversion##go version go}
- goversion=${goversion%% *}
- gov=${goversion%%rc*} # trim release candidates
- if min_version2 1.6 "$gov"; then
- echo "go tests: enabled, version=$goversion"
- export TEST_GO=yes
- else
- echo "go tests: disabled, version $goversion < 1.7"
- fi
- ;;
- *)
- echo "go tests: disabled, go executable not found"
- ;;
-esac
-
$SHELL "$TEST_DIR"/test_curl_altsvc.sh $HTTP_AUTH $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_proto_order.sh $HTTPS_AUTH $HTTPS_AUTH_2 &&
$SHELL "$TEST_DIR"/test_alt_host.sh $HTTPS_AUTH $HTTPS_AUTH_2 &&
@@ -75,6 +56,8 @@ $SHELL "$TEST_DIR"/test_ssl.sh $
$SHELL "$TEST_DIR"/test_upgrade.sh $HTTP_AUTH $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_header.sh $HTTPS_AUTH &&
$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 &&
@@ -85,15 +68,9 @@ $SHELL "$TEST_DIR"/test_nghttp_post.sh $
$SHELL "$TEST_DIR"/test_curl_get.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_curl_post.sh $HTTPS_AUTH ||fail
-if test "$TEST_GO" = "yes"; then
- # starting go client tests, still hangs with 1.7rc4, see
- $SHELL "$TEST_DIR"/go/test_get.sh $HTTPS_AUTH || fail
-fi
-
$SHELL "$TEST_DIR"/test_vars.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_window_update.sh $HTTP_AUTH_2 &&
$SHELL "$TEST_DIR"/test_header.sh $HTTPS_AUTH &&
-$SHELL "$TEST_DIR"/test_push.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_trailer.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_nghttp_get.sh $HTTPS_AUTH/proxy alpn "HTTP/1.1" &&
$SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTPS_AUTH/proxy alpn "HTTP/1.1" &&
@@ -111,7 +88,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_push.sh $HTTP_AUTH &&
$SHELL "$TEST_DIR"/test_trailer.sh $HTTP_AUTH &&
$SHELL "$TEST_DIR"/test_nghttp_get.sh $HTTP_AUTH direct &&
$SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTP_AUTH direct &&
@@ -131,6 +107,30 @@ $SHELL "$TEST_DIR"/test_nghttp_get.sh $
$SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTPS_AUTH_SER alpn "HTTP/1.1" &&
$SHELL "$TEST_DIR"/test_curl_get.sh $HTTPS_AUTH_SER alpn "HTTP/1.1" &&
$SHELL "$TEST_DIR"/test_curl_post.sh $HTTPS_AUTH_SER alpn "HTTP/1.1" &&
-$SHELL "$TEST_DIR"/test_trailer.sh $HTTPS_AUTH_SER &&
-:
+$SHELL "$TEST_DIR"/test_trailer.sh $HTTPS_AUTH_SER ||
+fail
+
+export TEST_GO=no
+case "$(type -p go)" in
+ *go)
+ goversion=$(go version)
+ goversion=${goversion##go version go}
+ goversion=${goversion%% *}
+ gov=${goversion%%rc*} # trim release candidates
+ if min_version2 1.6 "$gov"; then
+ echo "go tests: enabled, version=$goversion"
+ export TEST_GO=yes
+ else
+ echo "go tests: disabled, version $goversion < 1.7"
+ fi
+ ;;
+ *)
+ echo "go tests: disabled, go executable not found"
+ ;;
+esac
+
+if test "$TEST_GO" = "yes"; then
+ # starting go client tests, still hangs with 1.7rc4, see
+ $SHELL "$TEST_DIR"/go/test_get.sh $HTTPS_AUTH || fail
+fi
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=1769552&r1=1769551&r2=1769552&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_push.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_push.sh Sun Nov 13 21:50:54 2016
@@ -27,75 +27,75 @@ URL_PREFIX="$1"
if min_httpd_version 2.4.18; then
# 2 link headers
nghttp_check_fcontent 006-push.html "get 006-push" <<EOF
-006-push.html
+006.html
006/006.css
EOF
# 1 link header with 2 links, separated by ,
nghttp_check_fcontent 006-push2.html "get 006-push2" <<EOF
-006-push2.html
+006.html
006/006.js
EOF
# 1 link header, 1 link preload, 1 link with other relation
nghttp_check_fcontent 006-push3.html "get 006-push3" <<EOF
-006-push3.html
+006.html
006/006.js
EOF
# 1 link header with missing '>' link termination
nghttp_check_fcontent 006-push4.html "get 006-push4" <<EOF
-006-push4.html
+006.html
EOF
if min_httpd_version 2.4.19; then
# push-policies (https://tools.ietf.org/html/draft-ruellan-http-accept-push-policy-00)
# a. no pushes desired
nghttp_check_fcontent 006-push.html "policy: none" -H 'accept-push-policy: none' <<EOF
-006-push.html
+006.html
EOF
# push-policies (https://tools.ietf.org/html/draft-ruellan-http-accept-push-policy-00)
# b. default pushes desired
nghttp_check_fcontent 006-push.html "policy: default" -H 'accept-push-policy: default' <<EOF
-006-push.html
+006.html
006/006.css
EOF
# push-policies (https://tools.ietf.org/html/draft-ruellan-http-accept-push-policy-00)
# c. HEAD pushes desired
nghttp_check_fcontent 006-push.html "policy: head" -H 'accept-push-policy: head' <<EOF
-006-push.html
+006.html
EOF
# push-policies (https://tools.ietf.org/html/draft-ruellan-http-accept-push-policy-00)
# c. fast-load pushes desired
nghttp_check_fcontent 006-push.html "policy: fast-load" -H 'accept-push-policy: fast-load' <<EOF
-006-push.html
+006.html
006/006.css
EOF
# link header with double rel values
nghttp_check_fcontent 006-push5.html "get 006-push5" <<EOF
-006-push5.html
+006.html
006/006.css
EOF
# another link header with double rel values
nghttp_check_fcontent 006-push6.html "get 006-push6" <<EOF
-006-push6.html
+006.html
006/006.css
EOF
# another link header with double rel values
nghttp_check_fcontent 006-push7.html "get 006-push7" <<EOF
-006-push7.html
+006.html
006/006.css
EOF
# prelaod link header with explicit nopush param
nghttp_check_fcontent 006-push8.html "get 006-push8" <<EOF
-006-push7.html
+006.html
EOF
fi
@@ -189,6 +189,32 @@ EOF
echo "push diary require httpd >= 2.4.19"
fi
+ if min_httpd_version 2.4.24; then
+ # test H2PushResource directive and 103 response support
+
+ nghttp_check_pushed 006-push9.html "push9" <<EOF
+/006-push9.html 543 200
+/006/006.css 216 200 pushed
+/006/006.js 839 200 pushed
+EOF
+ nghttp_check_pushed proxy/006-push9.html "push9 via h1 proxy" <<EOF
+/proxy/006-push9.html 543 200
+EOF
+ nghttp_check_pushed h2proxy/006-push9.html "push9 via h2 proxy" <<EOF
+/h2proxy/006-push9.html 543 200
+/h2proxy/006/006.css 216 200 pushed
+/h2proxy/006/006.js 839 200 pushed
+EOF
+ nghttp_check_pushed proxy/006-push10.html "push10 for proxy" <<EOF
+/proxy/006-push10.html 543 200
+/006/006.css 216 200 pushed
+/006/006.js 839 200 pushed
+EOF
+
+ else
+ echo "H2PushResource tests require httpd >= 2.4.24"
+ fi
else
echo "push tests require httpd >= 2.4.18"
fi
+