Add test scenario content-filters
[privoxy.git] / tests / cts / content-filters / data / test34
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 filter site-specifics
7 </keywords>
8 </info>
9
10 <reply>
11 <data>
12 HTTP/1.1 200 OK\r
13 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
14 Connection: close\r
15 Content-Type: text/html\r
16 X-Control: swsclose\r
17 \r
18 # Here are some strings the site-specifics filter should filter:
19
20 # pcrs command 1:
21
22 indexOf("x11")
23
24 # pcrs command 2 (XXX: should probably kill the parens as well):
25
26 mylogfunc()
27
28 # pcrs command 3:
29
30 <a href="http://www.example.org/">Continue to message</a>
31 <a href="http://www.example.org/">Weiter zu Nachricht</a>
32
33 # pcrs command 4:
34
35 <input type="hidden" name="REDIRECT" value="http://www.example.org/">
36
37 # pcrs command 5:
38
39 <IMG SRC="http://media.monster.com/mm/usen/my/no_thanks_211x40.gif" blafasel>
40
41 # pcrs command 6:
42
43 <img blafasel onload="alert('blafasel')"
44
45 # pcrs command 7:
46
47 <INPUT name="1234" type="RADIO" value="0" CHECKED 
48 <INPUT name="123" type="RADIO" value="0" CHECKED 
49 <INPUT name="12" type="RADIO" value="0" CHECKED 
50
51 # pcrs command 8:
52
53 <INPUT name="12" type="RADIO" value="3" 
54 <INPUT name="123" type="RADIO" value="3" 
55 <INPUT name="1233" type="RADIO" value="3" 
56 </data>
57 </reply>
58
59 <proxy-reply>
60 <data>
61 HTTP/1.1 200 OK\r
62 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
63 Connection: close\r
64 Content-Type: text/html\r
65 X-Control: swsclose\r
66 Content-Length: 888\r
67 \r
68 # Here are some strings the site-specifics filter should filter:
69
70 # pcrs command 1:
71
72 indexOf("x13")
73
74 # pcrs command 2 (XXX: should probably kill the parens as well):
75
76 ()
77
78 # pcrs command 3:
79
80 <meta http-equiv="refresh" content="0; URL=http://www.example.org/">
81 <meta http-equiv="refresh" content="0; URL=http://www.example.org/">
82
83 # pcrs command 4:
84
85 <meta http-equiv="refresh" content="0; URL=http://www.example.org/">
86
87 # pcrs command 5:
88
89 <meta http-equiv="refresh" content="0; URL=http://my.monster.com/resume.asp">
90
91 # pcrs command 6:
92
93 <img blafasel never="alert('blafasel')"
94
95 # pcrs command 7:
96
97 <INPUT name="1234" type="RADIO" value="0"
98 <INPUT name="123" type="RADIO" value="0"
99 <INPUT name="12" type="RADIO" value="0"
100
101 # pcrs command 8:
102
103 <INPUT name="12" type="RADIO" value="3"  checked
104 <INPUT name="123" type="RADIO" value="3"  checked
105 <INPUT name="1233" type="RADIO" value="3"  checked
106 </data>
107 </proxy-reply>
108
109 <client>
110 <server>
111 http
112 </server>
113 <name>
114 +filter{site-specifics}
115 </name>
116 <features>
117 proxy
118 </features>
119 <command>
120 http://%HOSTIP:%HTTPPORT/site-specifics/%TESTNUMBER
121 </command>
122 </client>
123
124 <verify>
125 <protocol>
126 GET /site-specifics/%TESTNUMBER HTTP/1.1\r
127 Host: %HOSTIP:%HTTPPORT\r
128 User-Agent: curl/%VERSION\r
129 Accept: */*\r
130 Connection: close\r
131 \r
132 </protocol>
133 </verify>
134 </testcase>