httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1695875 - in /httpd/test/mod_h2/trunk: Makefile.am conf/httpd.conf conf/sites/test.example.org.conf conf/sites/test2.example.org.conf test/test_common.sh test/test_proto_order.sh
Date Fri, 14 Aug 2015 12:17:48 GMT
Author: icing
Date: Fri Aug 14 12:17:48 2015
New Revision: 1695875

URL: http://svn.apache.org/r1695875
Log:
adding test for vhost with alternate Protocols ordering

Added:
    httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf
    httpd/test/mod_h2/trunk/test/test_proto_order.sh
Modified:
    httpd/test/mod_h2/trunk/Makefile.am
    httpd/test/mod_h2/trunk/conf/httpd.conf
    httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf
    httpd/test/mod_h2/trunk/test/test_common.sh

Modified: httpd/test/mod_h2/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/Makefile.am?rev=1695875&r1=1695874&r2=1695875&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/Makefile.am (original)
+++ httpd/test/mod_h2/trunk/Makefile.am Fri Aug 14 12:17:48 2015
@@ -27,31 +27,33 @@ EXTRA_DIST = \
     test/*.txt
 
 
-HOST_NAME    = test.example.org
-HOST2_NAME   = test-ser.example.org
+HOST_NAME      = test.example.org
+HOST_NAME_2    = test2.example.org
+HOST_SER_NAME  = test-ser.example.org
 
-HTTP_PORT    = 12345
-HTTPS_PORT   = 12346
+HTTP_PORT      = 12345
+HTTPS_PORT     = 12346
 
-HTTP_AUTH    = $(HOST_NAME):$(HTTP_PORT)
-HTTPS_AUTH   = $(HOST_NAME):$(HTTPS_PORT)
-HTTPS_AUTH2  = $(HOST2_NAME):$(HTTPS_PORT)
+HTTP_AUTH      = $(HOST_NAME):$(HTTP_PORT)
+HTTPS_AUTH     = $(HOST_NAME):$(HTTPS_PORT)
+HTTPS_AUTH_2   = $(HOST_NAME_2):$(HTTPS_PORT)
+HTTPS_AUTH_SER = $(HOST_SER_NAME):$(HTTPS_PORT)
 
-GEN          = gen
-SERVER_DIR   = @SERVER_DIR@
+GEN            = gen
+SERVER_DIR     = @SERVER_DIR@
 
-SUB_DIRS     = clients
+SUB_DIRS       = clients
 
-APACHECTL    = @APACHECTL@ -d $(SERVER_DIR)
-HTTPD        = @HTTPD@
-CURL         = $(prefix)/bin/curl
-NGHTTP       = @NGHTTP@
-H2LOAD       = @H2LOAD@
+APACHECTL      = @APACHECTL@ -d $(SERVER_DIR)
+HTTPD          = @HTTPD@
+CURL           = $(prefix)/bin/curl
+NGHTTP         = @NGHTTP@
+H2LOAD         = @H2LOAD@
 
-TEST_DEP     = @TEST_DEP@
+TEST_DEP       = @TEST_DEP@
 
-PHP_FPM      = @PHP_FPM@
-PHP_FPM_PID  = gen/php-fpm/php-fpm.pid
+PHP_FPM        = @PHP_FPM@
+PHP_FPM_PID    = gen/php-fpm/php-fpm.pid
 
 
 .PHONY: clean test loadtest start stop restart install-client install-nghttp2
@@ -113,6 +115,7 @@ test: \
 	@rm -rf $(GEN)/tmp
 	@mkdir -p $(GEN)/tmp
 	@$(TESTRUN) test/test_curl_altsvc.sh http://$(HTTP_AUTH) https://$(HTTPS_AUTH)
+	@$(TESTRUN) test/test_proto_order.sh https://$(HTTPS_AUTH) https://$(HTTPS_AUTH_2)
 	@$(TESTRUN) test/test_alt_host.sh https://$(HTTPS_AUTH)
 	@$(TESTRUN) test/test_nghttp_get.sh  https://$(HTTPS_AUTH)
 	@$(TESTRUN) test/test_nghttp_post.sh https://$(HTTPS_AUTH)
@@ -140,10 +143,10 @@ test: \
 	@$(TESTRUN) test/test_nghttp_post.sh http://$(HTTP_AUTH)/rewrite
 	@$(TESTRUN) test/test_curl_get.sh    http://$(HTTP_AUTH)/rewrite
 	@$(TESTRUN) test/test_curl_post.sh   http://$(HTTP_AUTH)/rewrite
-	@$(TESTRUN) test/test_nghttp_get.sh  https://$(HTTPS_AUTH2)
-	@$(TESTRUN) test/test_nghttp_post.sh https://$(HTTPS_AUTH2)
-	@$(TESTRUN) test/test_curl_get.sh    https://$(HTTPS_AUTH2)
-	@$(TESTRUN) test/test_curl_post.sh   https://$(HTTPS_AUTH2)
+	@$(TESTRUN) test/test_nghttp_get.sh  https://$(HTTPS_AUTH_SER)
+	@$(TESTRUN) test/test_nghttp_post.sh https://$(HTTPS_AUTH_SER)
+	@$(TESTRUN) test/test_curl_get.sh    https://$(HTTPS_AUTH_SER)
+	@$(TESTRUN) test/test_curl_post.sh   https://$(HTTPS_AUTH_SER)
 
 ################################################################################
 # 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=1695875&r1=1695874&r2=1695875&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/httpd.conf (original)
+++ httpd/test/mod_h2/trunk/conf/httpd.conf Fri Aug 14 12:17:48 2015
@@ -62,6 +62,7 @@ DocumentRoot "SUBST_SERVER_ROOT_SUBST/ht
 
 <IfModule h2_module>
     LogLevel h2:info
+    LogLevel core:debug
     H2Engine on
 
     # max parallel streams per session, default 100

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=1695875&r1=1695874&r2=1695875&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 Aug 14 12:17:48 2015
@@ -23,6 +23,7 @@
 	ServerName test.example.org
     DocumentRoot "SUBST_SERVER_ROOT_SUBST/htdocs/test.example.org"
     Protocols h2 http/1.1
+    ProtocolsHonorOrder on
 
     SSLEngine on
     SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2

Added: httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf?rev=1695875&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf (added)
+++ httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf Fri Aug 14 12:17:48 2015
@@ -0,0 +1,21 @@
+################################################################################
+#
+# test2.example.org
+#
+# a host with preference to http/1.1
+#
+################################################################################
+<VirtualHost *:SUBST_PORT_HTTPS_SUBST>
+ServerName test2.example.org
+DocumentRoot "SUBST_SERVER_ROOT_SUBST/htdocs/test.example.org"
+Protocols http/1.1 h2
+ProtocolsHonorOrder on
+
+SSLEngine on
+SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
+SSLCipherSuite 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
   
+SSLHonorCipherOrder on
+SSLCertificateFile conf/ssl/test.example.org.pem
+SSLCertificateKeyFile conf/ssl/test.example.org.key
+
+</VirtualHost>

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=1695875&r1=1695874&r2=1695875&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Fri Aug 14 12:17:48 2015
@@ -68,6 +68,18 @@ curl_check_doc() {
     echo ok.
 }
 
+curl_check_alpn() {
+    PROTOCOL="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@ -v"
+    echo -n " * curl /: $MSG..."
+    rm -rf $TMP
+    mkdir -p $TMP
+    ${CURL} $ARGS $URL_PREFIX > $TMP/out 2>&1 || fail
+    fgrep "* ALPN, server accepted to use $PROTOCOL" $TMP/out >/dev/null || fail
+    echo ok.
+}
+
 nghttp_check_doc() {
     DOC="$1"; shift;
     MSG="$1"; shift;

Added: httpd/test/mod_h2/trunk/test/test_proto_order.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_proto_order.sh?rev=1695875&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_proto_order.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_proto_order.sh Fri Aug 14 12:17:48 2015
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# 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.
+#
+
+source $(dirname $0)/test_common.sh
+echo "check protocols ordering"
+
+################################################################################
+# check configured protocol ordering
+################################################################################
+
+H2_PREF_URL="$1"
+H1_PREF_URL="$2"
+
+URL_PREFIX="$H2_PREF_URL"
+curl_check_alpn h2 "check h2 preference" --http2
+
+URL_PREFIX="$H1_PREF_URL"
+curl_check_alpn http/1.1 "check http/1.1 preference" --http2



Mime
View raw message