Add test scenario client-body-filter
[privoxy.git] / tests / cts / client-body-filter / data / test10
diff --git a/tests/cts/client-body-filter/data/test10 b/tests/cts/client-body-filter/data/test10
new file mode 100644 (file)
index 0000000..d09d568
--- /dev/null
@@ -0,0 +1,44 @@
+<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 input.
+</data>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Attempt to apply client-body-filter{blafasel-to-bumfidel} to client request that does not completely arrive in time. (XXX: Privoxy sends a "Connection failed" message instead of a timeout message which would be more appropriate)
+</name>
+<features>
+proxy
+</features>
+# Sending the first request to appease the test framework.
+# We mainly care about the second request where we overwrite the Content-Length
+# header with an incorrect value so curl sends less data than Privoxy expects.
+<command>
+-s http://%HOSTIP:%HTTPPORT/first-request/%TESTNUMBER --next -s --write-out '%{stderr}%{response_code}\n' --limit-rate 5000 -d "blafasel%repeat[100 x padding]%" -H "Content-Length: 10000" http://%HOSTIP:%HTTPPORT/second-request/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<stderr>
+400
+</stderr>
+</verify>
+</testcase>