Add test scenario gzip compression
[privoxy.git] / tests / cts / gzip-compression / data / test23
diff --git a/tests/cts/gzip-compression/data/test23 b/tests/cts/gzip-compression/data/test23
new file mode 100644 (file)
index 0000000..07b5bf2
--- /dev/null
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+deflate compression
+skip
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Content-Encoding: deflate\r
+X-Control: swsclose\r
+\r
+%hex[%0b%ce%cf%4d%55%48%49%4d%cb%49%2c%49%55%48%cd%4b%ce%4f%49%4d%]hex%
+Bogus data blafasel
+</data>
+</reply>
+
+# The actual reply does not contain a line break after the trailing NUL byte
+# but we can't currently express this as the </data> tag has to be on its
+# own line.
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Content-Encoding: deflate\r
+X-Control: swsclose\r
+\r
+%hex[%0b%ce%cf%4d%55%48%49%4d%cb%49%2c%49%55%48%cd%4b%ce%4f%49%4d%]hex%
+Bogus data blafasel
+%hex[%00]hex%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+deflate-encoded content. Corrupted data.
+</name>
+<features>
+proxy
+</features>
+<command>
+-H "Accept-Encoding: deflate" http://%HOSTIP:%HTTPPORT/deflate-compressed-data/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /deflate-compressed-data/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+Accept-Encoding: deflate\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>