[master] 83ca874cf Test all the atypical GZIP headers
Poul-Henning Kamp
phk at FreeBSD.org
Tue Jan 29 19:30:18 UTC 2019
commit 83ca874cf376da8ae39c7974b184280e50fc0264
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Jan 29 19:28:38 2019 +0000
Test all the atypical GZIP headers
diff --git a/bin/varnishtest/tests/g00008.vtc b/bin/varnishtest/tests/g00008.vtc
new file mode 100644
index 000000000..3929b6999
--- /dev/null
+++ b/bin/varnishtest/tests/g00008.vtc
@@ -0,0 +1,30 @@
+varnishtest "Test uncommon GZIP header fields"
+
+# With a a handcrafted GZIP file with all optional header fields
+
+server s1 {
+ rxreq
+ txresp -hdr "content-encoding: gzip" -nolen
+ sendhex "1f 8b"
+ sendhex "08"
+ sendhex "1f"
+ sendhex "12 34 56 78"
+ sendhex "00"
+ sendhex "03"
+ sendhex "08 00 50 48 04 00 4b 61 6d 70"
+ sendhex "46 4e 41 4d 45 00"
+ sendhex "46 43 4f 4d 4d 45 4e 54 00"
+ sendhex "96 cc"
+ sendhex "f3 48 cd c9 c9 57 70 8f 52 08 cf 2f ca 49 e1 02 00"
+ sendhex "3a 0b 41 35"
+ sendhex "0f 00 00 00"
+} -start
+
+varnish v1 -vcl+backend { } -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.status == 200
+ expect resp.body == "Hello GZ World\n"
+} -run
More information about the varnish-commit
mailing list