Add test scenario content-filters
[privoxy.git] / tests / cts / content-filters / data / test4
diff --git a/tests/cts/content-filters/data/test4 b/tests/cts/content-filters/data/test4
new file mode 100644 (file)
index 0000000..f1eb3e3
--- /dev/null
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+filter content-cookies
+</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
+X-Control: swsclose\r
+\r
+# Here are some strings the content-cookies filter should modify:
+
+# pcrs command 1:
+
+blafasel.cookie=tralala=12
+blafasel.cookie='aab=keep-me-unmodified'
+
+# pcrs command 2:
+
+<meta http-equiv="set-cookie" content="blafasel=123">
+<meta http-equiv='set-cookie' content="blafasel=123">
+</data>
+</reply>
+
+<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
+X-Control: swsclose\r
+Content-Length: 215\r
+\r
+# Here are some strings the content-cookies filter should modify:
+
+# pcrs command 1:
+
+ZappedCookie=tralala=12
+blafasel.cookie='aab=keep-me-unmodified'
+
+# pcrs command 2:
+
+<!-- ZappedCookie -->
+<!-- ZappedCookie -->
+</data>
+</proxy-reply>
+
+
+<client>
+<server>
+http
+</server>
+<name>
++filter{content-cookies}
+</name>
+<features>
+proxy
+</features>
+<command>
+http://%HOSTIP:%HTTPPORT/content-cookies/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /content-cookies/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+Connection: close\r
+\r
+</protocol>
+</verify>
+</testcase>