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 2015/12/04 14:12:24 UTC
svn commit: r1717961 - in /httpd/test/mod_h2/trunk: Makefile.am
conf/sites/test.example.org.conf htdocs/test.example.org/https-check/
htdocs/test.example.org/https-check/htaccess
htdocs/test.example.org/https-check/index.html test/test_curl_altsvc.sh
Author: icing
Date: Fri Dec 4 13:12:24 2015
New Revision: 1717961
URL: http://svn.apache.org/viewvc?rev=1717961&view=rev
Log:
test for PR58666
Added:
httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/
httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/htaccess
httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/index.html
Modified:
httpd/test/mod_h2/trunk/Makefile.am
httpd/test/mod_h2/trunk/conf/sites/test.example.org.conf
httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh
Modified: httpd/test/mod_h2/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/Makefile.am?rev=1717961&r1=1717960&r2=1717961&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/Makefile.am (original)
+++ httpd/test/mod_h2/trunk/Makefile.am Fri Dec 4 13:12:24 2015
@@ -207,6 +207,8 @@ $(SERVER_DIR)/.testdocs-setup: \
@mkdir -p $(SERVER_DIR)/htdocs
@cp -r htdocs/test.example.org $(SERVER_DIR)/htdocs/
@chmod +x $$(find $(SERVER_DIR)/htdocs/test.example.org/ -name "*.py" )
+ @for i in $$(find $(SERVER_DIR)/htdocs/test.example.org/ -name "htaccess" ); \
+ do mv "$$i" "$$(dirname "$$i")/.htaccess"; done
@echo done.
@touch $(SERVER_DIR)/.testdocs-setup
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=1717961&r1=1717960&r2=1717961&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 Dec 4 13:12:24 2015
@@ -18,6 +18,9 @@
</IfModule>
</Directory>
+<Directory "SUBST_SERVER_ROOT_SUBST/htdocs/test.example.org/https-check">
+ AllowOverride All
+</Directory>
<VirtualHost *:SUBST_PORT_HTTPS_SUBST>
ServerName test.example.org
@@ -151,4 +154,5 @@
<Location /006-push4.html>
Header add Link "</006/006.css;rel=preload, </006/006.js>; preload"
</Location>
+
</VirtualHost>
Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/htaccess
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/htaccess?rev=1717961&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/htaccess (added)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/htaccess Fri Dec 4 13:12:24 2015
@@ -0,0 +1,4 @@
+RewriteEngine On
+
+RewriteCond %{HTTPS} !=on
+RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/index.html
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/index.html?rev=1717961&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/index.html (added)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/https-check/index.html Fri Dec 4 13:12:24 2015
@@ -0,0 +1,7 @@
+<html>
+ <head>
+ </head>
+ <body>
+ <h2>only https</h2>
+ </body>
+</html>
Modified: httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh?rev=1717961&r1=1717960&r2=1717961&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh Fri Dec 4 13:12:24 2015
@@ -28,3 +28,26 @@ curl_check_altsvc index.html '' "http/2"
URL_PREFIX="$HTTPS_URL"
curl_check_altsvc index.html 'h2=":12346", h2c=":12345", h2="mod-h2.greenbytes.de:12346"' "http/1.1" --http1.1
curl_check_altsvc index.html '' "http/2" --http2
+
+################################################################################
+# check HTTPS env in .htaccess
+################################################################################
+curl_check_content https-check/index.html "http/1.1" --http1.1 <<EOF
+<html>
+ <head>
+ </head>
+ <body>
+ <h2>only https</h2>
+ </body>
+</html>
+EOF
+
+curl_check_content https-check/index.html "http/2" --http2 <<EOF
+<html>
+ <head>
+ </head>
+ <body>
+ <h2>only https</h2>
+ </body>
+</html>
+EOF