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/03/02 11:24:09 UTC
svn commit: r1733242 - in /httpd/test/mod_h2/trunk/test: test_common.sh
test_push.sh
Author: icing
Date: Wed Mar 2 10:24:09 2016
New Revision: 1733242
URL: http://svn.apache.org/viewvc?rev=1733242&view=rev
Log:
adding push test for accept-encoding header
Modified:
httpd/test/mod_h2/trunk/test/test_common.sh
httpd/test/mod_h2/trunk/test/test_push.sh
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=1733242&r1=1733241&r2=1733242&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Wed Mar 2 10:24:09 2016
@@ -261,6 +261,25 @@ nghttp_check_fcontent() {
echo ok.
}
+nghttp_check_recv_header() {
+ local DOC="$1"; shift;
+ local HEADER="$1"; shift;
+ local MSG="$1"; shift;
+ rm -rf $TMP
+ mkdir -p "$TMP"
+ cat > $TMP/expected
+ echo -n " * nghttp /$DOC: $MSG..."
+ ${NGHTTP} "$@" -v $URL_PREFIX/$DOC 2>&1 |
+ fgrep -i "$HEADER" |
+ while read line; do
+ line="${line##*stream_id=}"
+ line="${line#*) }"
+ echo "$line";
+ done > $GEN/tmp/output
+ diff -u $TMP/expected $TMP/output || fail
+ echo ok.
+}
+
nghttp_check_promises() {
local MSG="$1"; shift;
rm -rf $TMP
Modified: 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=1733242&r1=1733241&r2=1733242&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_push.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_push.sh Wed Mar 2 10:24:09 2016
@@ -180,7 +180,11 @@ nghttp_check_pushed 006-push.html "006-p
/006-push.html 543 200
EOF
-
+# need to see this twice, once on the request and once on the push promise
+nghttp_check_recv_header 006-push.html accept-encoding "push accept-encoding check" <<EOF
+accept-encoding: gzip, deflate
+accept-encoding: gzip, deflate
+EOF
else
echo "push diary require httpd >= 2.4.19"