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/02/08 17:39:49 UTC
svn commit: r1729206 - in /httpd/test/mod_h2/trunk: Makefile.am
conf/httpd.conf conf/modules.conf conf/sites/test.example.org.conf
test/test.sh test/test_common.sh test/test_curl_get.sh test/test_proxy.sh
Author: icing
Date: Mon Feb 8 16:39:49 2016
New Revision: 1729206
URL: http://svn.apache.org/viewvc?rev=1729206&view=rev
Log:
added proxy_http2 tests
Added:
httpd/test/mod_h2/trunk/test/test_proxy.sh
Modified:
httpd/test/mod_h2/trunk/Makefile.am
httpd/test/mod_h2/trunk/conf/httpd.conf
httpd/test/mod_h2/trunk/conf/modules.conf
httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf
httpd/test/mod_h2/trunk/test/test.sh
httpd/test/mod_h2/trunk/test/test_common.sh
httpd/test/mod_h2/trunk/test/test_curl_get.sh
Modified: httpd/test/mod_h2/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/Makefile.am?rev=1729206&r1=1729205&r2=1729206&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/Makefile.am (original)
+++ httpd/test/mod_h2/trunk/Makefile.am Mon Feb 8 16:39:49 2016
@@ -118,7 +118,12 @@ test-gets: $(MH2FUZZ) $(SERVER_DIR)/.tes
@mkdir -p $(GEN)/tmp
$(TESTRUN) test/test.sh test $(HTTP_PORT) $(HTTPS_PORT) $(HOST_NAME) $(HOST_NAME_2) $(HOST_SER_NAME)
-test: test-gets fuzz
+test-proxy: $(MH2FUZZ) $(SERVER_DIR)/.test-setup
+ @rm -rf $(GEN)/tmp
+ @mkdir -p $(GEN)/tmp
+ $(TESTRUN) test/test_proxy.sh test $(HTTP_PORT) $(HTTPS_PORT) $(HOST_NAME) $(HOST_NAME_2) $(HOST_SER_NAME)
+
+test: test-gets test-proxy fuzz
################################################################################
# Load Test
Modified: httpd/test/mod_h2/trunk/conf/httpd.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/httpd.conf?rev=1729206&r1=1729205&r2=1729206&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/httpd.conf (original)
+++ httpd/test/mod_h2/trunk/conf/httpd.conf Mon Feb 8 16:39:49 2016
@@ -62,8 +62,10 @@ DocumentRoot "SUBST_SERVER_ROOT_SUBST/ht
<IfModule proxy_module>
ProxyStatus on
SSLProxyEngine on
- SSLProxyProtocol +TLSv1 +TLSv1.1 +TLSv1.2
- SSLProxyCipherSuite HIGH:!aNULL:!MD5
+ SSLProxyProtocol +TLSv1.2
+ # don't do this at home, kids
+ SSLProxyVerify none
+ SSLProxyCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK
<Proxy "balancer://http-local">
BalancerMember "http://127.0.0.1:SUBST_PORT_HTTP_SUBST"
</Proxy>
@@ -77,7 +79,8 @@ DocumentRoot "SUBST_SERVER_ROOT_SUBST/ht
MaxKeepAliveRequests 0
#LogLevel core:debug
- #LogLevel ssl:debug
+ #LogLevel ssl:trace1
+ #LogLevel proxy:debug
#DumpIOInput On
#DumpIOOutput On
#LogLevel dumpio:trace7
@@ -119,9 +122,12 @@ MaxKeepAliveRequests 0
# define mime-type based priorities for PUSHed resources
H2PushDiarySize 256
</IfVersion>
-
</IfModule>
+<IfModule proxy_http2_module>
+ LogLevel proxy_http2:info
+ ProxyVia full
+</IfModule>
################################################################################
# SSL Setup
@@ -141,6 +147,7 @@ MaxKeepAliveRequests 0
SSLUseStapling On
SSLStaplingCache shmcb:logs/ssl_stapling(32768)
+
</IfModule>
################################################################################
Modified: httpd/test/mod_h2/trunk/conf/modules.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/modules.conf?rev=1729206&r1=1729205&r2=1729206&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/modules.conf (original)
+++ httpd/test/mod_h2/trunk/conf/modules.conf Mon Feb 8 16:39:49 2016
@@ -99,3 +99,6 @@ LoadModule rewrite_module modules/mod_re
#LoadModule fcgid_module modules/mod_fcgid.so
LoadModule http2_module modules/mod_http2.so
+<IfVersion >= 2.5.0>
+LoadModule proxy_http2_module modules/mod_proxy_http2.so
+</IfVersion>
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=1729206&r1=1729205&r2=1729206&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 Mon Feb 8 16:39:49 2016
@@ -19,6 +19,15 @@
AllowOverride All
</Directory>
+<IfModule proxy_http2_module>
+ <Proxy "balancer://h2-local">
+ BalancerMember "h2://test.example.org:SUBST_PORT_HTTPS_SUBST"
+ </Proxy>
+ <Proxy "balancer://h2c-local">
+ BalancerMember "h2c://test.example.org:SUBST_PORT_HTTP_SUBST"
+ </Proxy>
+</IfModule>
+
<VirtualHost *:SUBST_PORT_HTTPS_SUBST>
ServerName test.example.org
ServerAlias test3.example.org
@@ -131,6 +140,13 @@
Allow from all
</Location>
+ <IfModule proxy_http2_module>
+ ProxyPass "/h2proxy" "balancer://h2-local"
+ ProxyPassReverse "/h2proxy" "balancer://h2-local"
+ ProxyPass "/h2cproxy" "balancer://h2c-local"
+ ProxyPassReverse "/h2cproxy" "balancer://h2c-local"
+ </IfModule>
+
<IfVersion >= 2.5.0>
<Location /h2only.html>
Require expr "%{HTTP2} == 'on'"
@@ -198,7 +214,15 @@
Header add Link "</apache.org-files/ant.jpg>;rel=preload"
</Location>
+ <IfModule proxy_http2_module>
+ ProxyPass "/h2proxy" "balancer://h2-local"
+ ProxyPassReverse "/h2proxy" "balancer://h2-local"
+ ProxyPass "/h2cproxy" "balancer://h2c-local"
+ ProxyPassReverse "/h2cproxy" "balancer://h2c-local"
+ </IfModule>
+
<Location "/http2-status">
SetHandler http2-status
</Location>
+
</VirtualHost>
Modified: httpd/test/mod_h2/trunk/test/test.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test.sh?rev=1729206&r1=1729205&r2=1729206&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test.sh (original)
+++ httpd/test/mod_h2/trunk/test/test.sh Mon Feb 8 16:39:49 2016
@@ -19,7 +19,7 @@
################################################################################
-TEST_DIR="$1"; shift
+export TEST_DIR="$1"; shift
HTTP_PORT="$1"; shift
HTTPS_PORT="$1"; shift
HOST_NAME="$1"; shift
@@ -86,4 +86,9 @@ $SHELL "$TEST_DIR"/test_nghttp_post.sh $
$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_proxy.sh "$TEST_DIR" $HTTP_PORT $HTTPS_PORT \
+ $HOST_NAME $HOST_NAME_2 $HOST_NAME_SER &&
+$SHELL "$TEST_DIR"/test_proxy.sh "$TEST_DIR" $HTTP_PORT $HTTPS_PORT \
+ $HOST_NAME $HOST_NAME_2 $HOST_NAME_SER &&
:
+
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=1729206&r1=1729205&r2=1729206&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Mon Feb 8 16:39:49 2016
@@ -20,6 +20,7 @@
URL_PREFIX="$1"
OPT_DIRECT="$2"
EXP_PROTOCOL="${3:-HTTP/2}"
+EXP_H1_PROTOCOL="HTTP/1.1"
EXP_SSL_PROTOCOL=""
EXP_HTTPS=""
EXP_HTTP2=""
@@ -75,12 +76,37 @@ fail() {
case "$URL_PREFIX" in
*/proxy|*/rewrite)
+ EXP_PROTOCOL="HTTP/1.1"
EXP_HTTP2=""
EXP_H2PUSH=""
+ EXP_H1_HTTP2=""
+ EXP_H2_H2PUSH=""
+ ;;
+ */h2proxy)
+ EXP_HTTPS="on"
+ EXP_PROTOCOL="HTTP/2"
+ EXP_H1_PROTOCOL="${EXP_PROTOCOL}"
+ EXP_SSL_PROTOCOL="TLSv1.2"
+ EXP_HTTP2="on"
+ EXP_H2PUSH="off"
+ EXP_H1_HTTP2="${EXP_HTTP2}"
+ EXP_H1_H2PUSH="${EXP_H2PUSH}"
+ ;;
+ */h2cproxy)
+ EXP_HTTPS=""
+ EXP_SSL_PROTOCOL=""
+ EXP_PROTOCOL="HTTP/2"
+ EXP_H1_PROTOCOL="${EXP_PROTOCOL}"
+ EXP_HTTP2="on"
+ EXP_H2PUSH="off"
+ EXP_H1_HTTP2="${EXP_HTTP2}"
+ EXP_H1_H2PUSH="${EXP_H2PUSH}"
;;
*)
EXP_HTTP2="on"
EXP_H2PUSH="on"
+ EXP_H1_HTTP2=""
+ EXP_H2_H2PUSH=""
;;
esac
Modified: httpd/test/mod_h2/trunk/test/test_curl_get.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_curl_get.sh?rev=1729206&r1=1729205&r2=1729206&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_curl_get.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_curl_get.sh Mon Feb 8 16:39:49 2016
@@ -43,10 +43,10 @@ curl_check_content hello.py "default" <<
<body>
<h2>Hello World!</h2>
HTTPS=${EXP_HTTPS}<br/>
-PROTOCOL=HTTP/1.1<br/>
+PROTOCOL=${EXP_H1_PROTOCOL}<br/>
SSL_PROTOCOL=${EXP_SSL_PROTOCOL}<br/>
-HTTP2=<br/>
-H2PUSH=<br/>
+HTTP2=${EXP_H1_HTTP2}<br/>
+H2PUSH=${EXP_H1_H2PUSH}<br/>
</body>
</html>
EOF
@@ -57,10 +57,10 @@ curl_check_content hello.py "http/1.1" -
<body>
<h2>Hello World!</h2>
HTTPS=${EXP_HTTPS}<br/>
-PROTOCOL=HTTP/1.1<br/>
+PROTOCOL=${EXP_H1_PROTOCOL}<br/>
SSL_PROTOCOL=${EXP_SSL_PROTOCOL}<br/>
-HTTP2=<br/>
-H2PUSH=<br/>
+HTTP2=${EXP_H1_HTTP2}<br/>
+H2PUSH=${EXP_H1_H2PUSH}<br/>
</body>
</html>
EOF
Added: 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=1729206&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_proxy.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_proxy.sh Mon Feb 8 16:39:49 2016
@@ -0,0 +1,46 @@
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+################################################################################
+# check announcements of upgrade: possibilities
+################################################################################
+
+
+TEST_DIR="$1"; shift
+HTTP_PORT="$1"; shift
+HTTPS_PORT="$1"; shift
+HOST_NAME="$1"; shift
+HOST_NAME_2="$1"; shift
+HOST_NAME_SER="$1"; shift
+
+HTTP_AUTH=http://$HOST_NAME:$HTTP_PORT
+HTTP_AUTH_2=http://$HOST_NAME_2:$HTTP_PORT
+HTTPS_AUTH=https://$HOST_NAME:$HTTPS_PORT
+HTTPS_AUTH_2=https://$HOST_NAME_2:$HTTPS_PORT
+HTTPS_AUTH_SER=https://$HOST_NAME_SER:$HTTPS_PORT
+
+MH2FUZZ=mh2fuzz/mh2fuzz
+
+source $(dirname $0)/test_common.sh
+
+if min_version 2.5.0; then
+$SHELL "$TEST_DIR"/test_nghttp_get.sh $HTTPS_AUTH/h2cproxy &&
+$SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTPS_AUTH/h2cproxy &&
+$SHELL "$TEST_DIR"/test_curl_get.sh $HTTPS_AUTH/h2cproxy &&
+$SHELL "$TEST_DIR"/test_curl_post.sh $HTTPS_AUTH/h2cproxy
+
+$SHELL "$TEST_DIR"/test_nghttp_get.sh $HTTPS_AUTH/h2proxy &&
+$SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTPS_AUTH/h2proxy &&
+$SHELL "$TEST_DIR"/test_curl_get.sh $HTTPS_AUTH/h2proxy &&
+$SHELL "$TEST_DIR"/test_curl_post.sh $HTTPS_AUTH/h2proxy
+
+fi