httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1714558 - in /httpd/test/mod_h2/trunk: Makefile.am conf/sites/test.example.org.conf htdocs/test.example.org/006-push2.html htdocs/test.example.org/006-push3.html htdocs/test.example.org/006-push4.html test/test_common.sh test/test_push.sh
Date Mon, 16 Nov 2015 11:24:09 GMT
Author: icing
Date: Mon Nov 16 11:24:09 2015
New Revision: 1714558

URL: http://svn.apache.org/viewvc?rev=1714558&view=rev
Log:
adding server push tests

Added:
    httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push2.html   (with props)
    httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push3.html   (with props)
    httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push4.html   (with props)
    httpd/test/mod_h2/trunk/test/test_push.sh
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_common.sh

Modified: httpd/test/mod_h2/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/Makefile.am?rev=1714558&r1=1714557&r2=1714558&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/Makefile.am (original)
+++ httpd/test/mod_h2/trunk/Makefile.am Mon Nov 16 11:24:09 2015
@@ -123,6 +123,7 @@ test: \
 	@$(TESTRUN) test/test_nghttp_post.sh https://$(HTTPS_AUTH)
 	@$(TESTRUN) test/test_curl_get.sh    https://$(HTTPS_AUTH)
 	@$(TESTRUN) test/test_curl_post.sh   https://$(HTTPS_AUTH)
+	@$(TESTRUN) test/test_push.sh        https://$(HTTPS_AUTH)
 	@$(TESTRUN) test/test_nghttp_get.sh  https://$(HTTPS_AUTH)/proxy alpn "HTTP/1.1"
 	@$(TESTRUN) test/test_nghttp_post.sh https://$(HTTPS_AUTH)/proxy alpn "HTTP/1.1"
 	@$(TESTRUN) test/test_curl_get.sh    https://$(HTTPS_AUTH)/proxy alpn "HTTP/1.1"
@@ -135,6 +136,7 @@ test: \
 	@$(TESTRUN) test/test_nghttp_post.sh http://$(HTTP_AUTH)
 	@$(TESTRUN) test/test_curl_get.sh    http://$(HTTP_AUTH)
 	@$(TESTRUN) test/test_curl_post.sh   http://$(HTTP_AUTH)
+	@$(TESTRUN) test/test_push.sh        http://$(HTTP_AUTH)
 	@$(TESTRUN) test/test_nghttp_get.sh  http://$(HTTP_AUTH) direct
 	@$(TESTRUN) test/test_nghttp_post.sh http://$(HTTP_AUTH) direct
 	@$(TESTRUN) test/test_nghttp_get.sh  http://$(HTTP_AUTH)/proxy alpn "HTTP/1.1"

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=1714558&r1=1714557&r2=1714558&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 Nov 16 11:24:09 2015
@@ -44,7 +44,16 @@
 
     <Location /006-push.html>
         Header add Link "</006/006.css>;rel=preload"
-        Header add Link "</006/006.js>;rel=preload"
+        Header add Link "</006/006.js>;rel=preloadX"
+    </Location>
+    <Location /006-push2.html>
+        Header add Link "</006/006.css>;rel=preloadX, </006/006.js>; rel=preload"
+    </Location>
+    <Location /006-push3.html>
+        Header add Link "</006/006.css>;rel=preloa,</006/006.js>;rel=preload"
+    </Location>
+    <Location /006-push4.html>
+        Header add Link "</006/006.css;rel=preload, </006/006.js>; preload"
     </Location>
     <Location /apache.org.html>
         Header add Link "</apache.org-files/defaulten.js>;rel=preload"
@@ -121,4 +130,17 @@
     </Location>
     RewriteRule /rewrite(.*) http://test.example.org:SUBST_PORT_HTTP_SUBST$1 [P]
 
+    <Location /006-push.html>
+        Header add Link "</006/006.css>;rel=preload"
+        Header add Link "</006/006.js>;rel=preloadX"
+    </Location>
+    <Location /006-push2.html>
+        Header add Link "</006/006.css>;rel=preloadX, </006/006.js>; rel=preload"
+    </Location>
+    <Location /006-push3.html>
+        Header add Link "</006/006.css>;rel=preloa,</006/006.js>;rel=preload"
+    </Location>
+    <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/006-push2.html
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push2.html?rev=1714558&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push2.html (added)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push2.html Mon Nov 16 11:24:09 2015
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML> 
+ <html>
+   <head>
+     <title>HTML/2.0 Test File: 006</title>
+     <link rel="stylesheet" type="text/css" href="006/006.css">
+     <script type="text/javascript" src="006/006.js"></script>
+   </head>
+   <body>
+     <h1>HTML/2.0 Test File: 006</h1>
+     <div class="listTitle">This page contains:
+	     <ul class="listElements">
+			<li>HTML
+			<li>CSS
+			<li>JavaScript
+		</ul> 
+	</div>
+	<div class="listTitle">
+		<script type="text/javascript">
+		 mainJavascript();
+		</script>
+	</div>
+   </body>
+</html>
\ No newline at end of file

Propchange: httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push2.html
------------------------------------------------------------------------------
    svn:executable = *

Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push3.html
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push3.html?rev=1714558&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push3.html (added)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push3.html Mon Nov 16 11:24:09 2015
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML> 
+ <html>
+   <head>
+     <title>HTML/2.0 Test File: 006</title>
+     <link rel="stylesheet" type="text/css" href="006/006.css">
+     <script type="text/javascript" src="006/006.js"></script>
+   </head>
+   <body>
+     <h1>HTML/2.0 Test File: 006</h1>
+     <div class="listTitle">This page contains:
+	     <ul class="listElements">
+			<li>HTML
+			<li>CSS
+			<li>JavaScript
+		</ul> 
+	</div>
+	<div class="listTitle">
+		<script type="text/javascript">
+		 mainJavascript();
+		</script>
+	</div>
+   </body>
+</html>
\ No newline at end of file

Propchange: httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push3.html
------------------------------------------------------------------------------
    svn:executable = *

Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push4.html
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push4.html?rev=1714558&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push4.html (added)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push4.html Mon Nov 16 11:24:09 2015
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML> 
+ <html>
+   <head>
+     <title>HTML/2.0 Test File: 006</title>
+     <link rel="stylesheet" type="text/css" href="006/006.css">
+     <script type="text/javascript" src="006/006.js"></script>
+   </head>
+   <body>
+     <h1>HTML/2.0 Test File: 006</h1>
+     <div class="listTitle">This page contains:
+	     <ul class="listElements">
+			<li>HTML
+			<li>CSS
+			<li>JavaScript
+		</ul> 
+	</div>
+	<div class="listTitle">
+		<script type="text/javascript">
+		 mainJavascript();
+		</script>
+	</div>
+   </body>
+</html>
\ No newline at end of file

Propchange: httpd/test/mod_h2/trunk/htdocs/test.example.org/006-push4.html
------------------------------------------------------------------------------
    svn:executable = *

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=1714558&r1=1714557&r2=1714558&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Mon Nov 16 11:24:09 2015
@@ -140,6 +140,20 @@ nghttp_check_content() {
     echo ok.
 }
 
+nghttp_check_fcontent() {
+    DOC="$1"; shift;
+    MSG="$1"; shift;
+    rm -rf $TMP
+    mkdir -p "$(dirname $TMP/$DOC)"
+    rm -f $TMP/expected; while read fpath; do
+        cat $DOC_ROOT/$fpath >> $TMP/expected
+    done
+    echo -n " * nghttp /$DOC: $MSG..."
+    ${NGHTTP} "$@" $ARG_UPGRADE $URL_PREFIX/$DOC > $TMP/$DOC 2>&1 || fail
+    diff  $TMP/expected $TMP/$DOC || fail
+    echo ok.
+}
+
 
 curl_check_status() {
     DOC="$1"; shift;

Added: 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=1714558&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_push.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_push.sh Mon Nov 16 11:24:09 2015
@@ -0,0 +1,48 @@
+#!/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 "test server push"
+
+################################################################################
+# check announcements of upgrade: possibilities
+################################################################################
+
+
+URL_PREFIX="$1"
+
+# 2 link headers
+nghttp_check_fcontent 006-push.html "get 006-push"   <<EOF
+006-push.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/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/006.js
+EOF
+
+# 1 link header with missing '>' link termination
+nghttp_check_fcontent 006-push4.html "get 006-push4"   <<EOF
+006-push4.html
+EOF



Mime
View raw message