httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1726168 - in /httpd/test/mod_h2/trunk: conf/modules.conf conf/sites/test.example.org.conf test/test.sh test/test_common.sh test/test_nghttp_get.sh test/test_vars.sh
Date Fri, 22 Jan 2016 10:10:08 GMT
Author: icing
Date: Fri Jan 22 10:10:06 2016
New Revision: 1726168

URL: http://svn.apache.org/viewvc?rev=1726168&view=rev
Log:
new expr var tests, mod_cgi again required

Added:
    httpd/test/mod_h2/trunk/test/test_vars.sh
Modified:
    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_nghttp_get.sh

Modified: httpd/test/mod_h2/trunk/conf/modules.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/modules.conf?rev=1726168&r1=1726167&r2=1726168&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/modules.conf (original)
+++ httpd/test/mod_h2/trunk/conf/modules.conf Fri Jan 22 10:10:06 2016
@@ -48,7 +48,7 @@ LoadModule reqtimeout_module modules/mod
 LoadModule filter_module modules/mod_filter.so
 #LoadModule substitute_module modules/mod_substitute.so
 #LoadModule sed_module modules/mod_sed.so
-LoadModule deflate_module modules/mod_deflate.so
+#LoadModule deflate_module modules/mod_deflate.so
 LoadModule mime_module modules/mod_mime.so
 LoadModule log_config_module modules/mod_log_config.so
 #LoadModule log_debug_module modules/mod_log_debug.so

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=1726168&r1=1726167&r2=1726168&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 Jan 22 10:10:06 2016
@@ -127,6 +127,14 @@
         Allow from all
     </Location>
 
+    <IfVersion >= 2.5.0>
+        <Location /h2only.html>
+            Require expr "%{HTTP2} == 'on'"
+        </Location>
+        <Location /noh2.html>
+            Require expr "%{HTTP2} == 'off'"
+        </Location>
+    </IfVersion>
 </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=1726168&r1=1726167&r2=1726168&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test.sh (original)
+++ httpd/test/mod_h2/trunk/test/test.sh Fri Jan 22 10:10:06 2016
@@ -45,6 +45,7 @@ $SHELL "$TEST_DIR"/test_nghttp_get.sh  $
 $SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_curl_get.sh    $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_curl_post.sh   $HTTPS_AUTH                            &&
+$SHELL "$TEST_DIR"/test_vars.sh        $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_window_update.sh $HTTP_AUTH_2                         &&
 $SHELL "$TEST_DIR"/test_push.sh        $HTTPS_AUTH                            &&
 $SHELL "$TEST_DIR"/test_trailer.sh     $HTTPS_AUTH                            &&

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=1726168&r1=1726167&r2=1726168&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Fri Jan 22 10:10:06 2016
@@ -128,15 +128,10 @@ nghttp_check_doc() {
     echo ok.
 }
 
-nghttp_check_assets() {
-    DOC="$1"; shift;
-    MSG="$1"; shift;
-    echo -n " * nghttp /$DOC: $MSG..."
-    rm -rf $TMP &&
-    mkdir -p "$TMP"
-    sort > $TMP/reference
-    ${NGHTTP} -ans "$@" $ARG_UPGRADE $URL_PREFIX/$DOC > $TMP/out 2>&1 || fail
-    fgrep " /" $TMP/out | while read id begin end dur stat size path xxx; do
+nghttp_filter_assets() {
+    infile="$1"
+    outfile="$2"
+    fgrep " /" "$infile" | while read id begin end dur stat size path xxx; do
         if test "$end" = '*'; then
             end="$dur"
             dur="$stat"
@@ -147,7 +142,32 @@ nghttp_check_assets() {
         else 
             echo "$path $size $stat"
         fi
-    done | sort > $TMP/output || fail
+    done | sort > "$outfile" || fail
+}
+
+nghttp_check_status() {
+    DOC="$1"; shift;
+    STATUS="$1"; shift;
+    MSG="$1"; shift;
+    echo -n " * nghttp /$DOC: $MSG..."
+    rm -rf $TMP &&
+    mkdir -p "$TMP" &&
+    ${NGHTTP} -ans "$@" $ARG_UPGRADE $URL_PREFIX/$DOC > $TMP/out 2>&1 || fail
+    nghttp_filter_assets $TMP/out $TMP/output
+    read url clen status xxx < $TMP/output
+    test "$STATUS" = "$status" || fail "unexpected status(exp $STATUS): $( cat $TMP/output
)"
+    echo ok.
+}
+
+nghttp_check_assets() {
+    DOC="$1"; shift;
+    MSG="$1"; shift;
+    echo -n " * nghttp /$DOC: $MSG..."
+    rm -rf $TMP &&
+    mkdir -p "$TMP"
+    sort > $TMP/reference
+    ${NGHTTP} -ans "$@" $ARG_UPGRADE $URL_PREFIX/$DOC > $TMP/out 2>&1 || fail
+    nghttp_filter_assets $TMP/out $TMP/output
     diff $TMP/reference $TMP/output  || fail
     echo ok.
 }

Modified: httpd/test/mod_h2/trunk/test/test_nghttp_get.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_nghttp_get.sh?rev=1726168&r1=1726167&r2=1726168&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_nghttp_get.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_nghttp_get.sh Fri Jan 22 10:10:06 2016
@@ -230,8 +230,8 @@ EOF
 
 nghttp_check_assets 006.html "with assets" <<EOF
 $URL_PATH/006.html 543 200
-$URL_PATH/006/006.css 176 200
-$URL_PATH/006/006.js 353 200
+$URL_PATH/006/006.css 216 200
+$URL_PATH/006/006.js 839 200
 EOF
 
 nghttp_check_assets 007.html "with assets" <<EOF

Added: httpd/test/mod_h2/trunk/test/test_vars.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_vars.sh?rev=1726168&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_vars.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_vars.sh Fri Jan 22 10:10:06 2016
@@ -0,0 +1,34 @@
+#!/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 h2 variables"
+
+################################################################################
+# check announcements of upgrade: possibilities
+################################################################################
+
+URL_PREFIX="$1"
+
+################################################################################
+# check HTTP2 ap_expr var
+################################################################################
+if min_version 2.5.0; then
+
+nghttp_check_status h2only.html 404 "only h2 access"
+nghttp_check_status noh2.html 403 "no h2 access"
+
+fi
\ No newline at end of file



Mime
View raw message