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 2019/06/14 11:56:23 UTC
svn commit: r1861335 - /httpd/test/mod_h2/trunk/test/test_debug.sh
Author: icing
Date: Fri Jun 14 11:56:23 2019
New Revision: 1861335
URL: http://svn.apache.org/viewvc?rev=1861335&view=rev
Log:
* re-enabling trailer test in h2 state handler
* adding trailer test for http2 proxy test
Modified:
httpd/test/mod_h2/trunk/test/test_debug.sh
Modified: httpd/test/mod_h2/trunk/test/test_debug.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_debug.sh?rev=1861335&r1=1861334&r2=1861335&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_debug.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_debug.sh Fri Jun 14 11:56:23 2019
@@ -57,7 +57,23 @@ nghttp_post_debug() {
cat > $TMP/expected
echo -n " * nghttp /$DOC: $MSG..."
${NGHTTP} "$@"$ARG_UPGRADE --data=$FILE $URL_PREFIX/$DOC > $TMP/output 2>&1 || fail "error uploading $fname"
- fgrep 'recv (' < $TMP/output | fgrep -v date: | fgrep -v server: |
+ fgrep 'recv (' < $TMP/output | fgrep -v date: | fgrep -v server: |
+ sed 's/.* recv .stream_id=... //g' > $TMP/filtered
+ nghttp_diff $TMP/expected $TMP/filtered || fail
+ echo ok.
+}
+
+nghttp_post_proxy_debug() {
+ local DOC="$1"; shift;
+ local FILE="$1"; shift;
+ local MSG="$1"; shift;
+ rm -rf $TMP
+ mkdir -p $TMP
+ cat > $TMP/expected
+ echo -n " * nghttp /$DOC: $MSG..."
+ ${NGHTTP} "$@"$ARG_UPGRADE --data=$FILE $URL_PREFIX/$DOC > $TMP/output 2>&1 || fail "error uploading $fname"
+ fgrep 'recv (' < $TMP/output | fgrep -v date: | fgrep -v server: | fgrep -v via: |
+ fgrep -v conn-flow-in: | fgrep -v conn-flow-out: |
sed 's/.* recv .stream_id=... //g' > $TMP/filtered
nghttp_diff $TMP/expected $TMP/filtered || fail
echo ok.
@@ -135,11 +151,18 @@ EOF
test_gen_data
# check that incoming trailers are seen in POST requests
-#nghttp_post_debug .well-known/h2/state $GEN/data-1k "1 trailer (POST)" --trailer "test: 1" -v <<EOF
-#:status: 200
-#content-type: application/json
-#conn-flow-in: 2147483647
-#conn-flow-out: 65535
-#h2-trailers-in: 1
-#EOF
+nghttp_post_debug .well-known/h2/state $GEN/data-1k "1 trailer (POST)" --trailer "test: 1" -v <<EOF
+:status: 200
+content-type: application/json
+conn-flow-in: 2147483647
+conn-flow-out: 65535
+h2-trailers-in: 1
+EOF
+
+# check that incoming trailers are seen in POST requests via mod_proxy_http2
+nghttp_post_proxy_debug h2proxy/.well-known/h2/state $GEN/data-1k "1 trailer (POST)" --trailer "test: 1" -v <<EOF
+:status: 200
+content-type: application/json
+h2-trailers-in: 1
+EOF