Add test scenario client-body-filter
[privoxy.git] / tests / cts / client-body-filter / data / test12
diff --git a/tests/cts/client-body-filter/data/test12 b/tests/cts/client-body-filter/data/test12
new file mode 100644 (file)
index 0000000..8db65fd
--- /dev/null
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+client-body-filter
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/html
+X-Connection: swsclose
+
+Received your first request.
+</data>
+<data1>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/html
+X-Connection: swsclose
+
+Received your second request.
+</data1>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Attempt to apply client-body-filter{blafasel-to-bumfidel} to client request that is too large to buffer.
+</name>
+<features>
+proxy
+</features>
+# Sending the first request to appease the test framework.
+# We mainly care about the second request which is too large for Privoxy to buffer it.
+<command>
+http://%HOSTIP:%HTTPPORT/first-request/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" http://%HOSTIP:%HTTPPORT/second-request/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol nonewline="yes">
+GET /first-request/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+Connection: close\r
+\r
+POST /second-request/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+Content-Length: 140008\r
+Content-Type: application/x-www-form-urlencoded\r
+Connection: close\r
+\r
+blafasel%repeat[20000 x padding]%
+</protocol>
+</verify>
+</testcase>