Workaround for firefox hanging on blocked javascript pages
[privoxy.git] / regression-tests.action
1 #############################################################################
2 # $Id: regression-tests.action,v 1.32 2009/07/19 09:21:19 fabiankeil Exp $
3 #############################################################################
4 #
5 # This is a configuration file for Privoxy-Regression-Test
6 # (included in the source tarball's tools directory).
7 #
8 # After referencing it in your Privoxy configuration both Privoxy and
9 # Privoxy-Regression-Test should be good to go.
10 #
11 #############################################################################
12 #
13 # Copyright (c) 2007-2009 Fabian Keil <fk@fabiankeil.de>
14 #
15 # Permission to use, copy, modify, and distribute this software for any
16 # purpose with or without fee is hereby granted, provided that the above
17 # copyright notice and this permission notice appear in all copies.
18 #
19 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
20 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
21 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
22 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
24 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
25 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26 #
27 #############################################################################
28
29 {{settings}}
30 for-privoxy-version=3.0.14
31
32 # Some dependencies Privoxy-Regression-Test should know about:
33 #
34 # Level  9 needs = config line user-manual\s+(\.?\.?/|[A-Za-z]:)
35 # Level 12 needs = config line enable-edit-actions\s+1
36 # Level 13 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
37 # Level 13 needs = config line keep-alive-timeout\s+[1-9]+
38 # Level 14 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE No
39 # Level 15 needs = config line connection-sharing\s+0
40 # Level 16 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
41 # Level 16 needs = config line connection-sharing\s+1
42 # Level 17 needs = feature status FEATURE_PTHREAD Yes
43
44 #######################################################
45 # Enable taggers to activate the tests on demand
46 # and suppress hiding the User-Agent for
47 # Privoxy-Regression-Test to save log space.
48 #######################################################
49 {\
50  +client-header-tagger{user-agent} \
51  +client-header-tagger{privoxy-control} \
52  +client-header-filter{privoxy-control} \
53 }
54 config.privoxy.org/
55 p.p/
56 127.0.0.1/
57
58 {-hide-user-agent}
59 TAG:^User-Agent: Privoxy-Regression-Test
60
61 #######################################################
62 # Test accept-language{}.
63 #######################################################
64
65 # Set Header    = Accept-Language: de-de
66 # Expect Header = Accept-Language: en-gb
67 {+hide-accept-language{en-gb}}
68 TAG:^hide-accept-language\{en-gb\}$
69
70 # Set Header    = Accept-Language: de-de
71 # Expect Header = REMOVAL
72 {+hide-accept-language{block}}
73 TAG:^hide-accept-language\{block\}$
74
75 #######################################################
76 # Sections for hide-referrer{} to test:
77 #
78 # 1) conditional-block
79 # 2) conditional-forge
80 # 3) forge
81 # 4) block
82 # 5) a parameter that looks like a valid fake referrer 
83 # 6) a parameter that looks like an invalid fake referrer
84 #######################################################
85
86 # Set Header    = Referer: http://www.example.org/foo 
87 # Expect Header = REMOVAL
88 #
89 # Set Header    = Referer: http://p.p/foo
90 # Expect Header = NO CHANGE
91 #
92 # Set Header    = Referer: p.p/
93 # Expect Header = REMOVAL
94 #
95 # Set Header    = Referer: p
96 # Expect Header = REMOVAL
97 #
98 # Set Header    = Referer: http://
99 # Expect Header = REMOVAL
100 #
101 # Set Header    = Referer: https://p.p/
102 # Expect Header = REMOVAL
103 {+hide-referrer{conditional-block}}
104 TAG:^hide-referrer\{conditional-block\}$
105
106 # Set Header    = Referer: http://www.example.org/foo 
107 # Expect Header = Referer: http://p.p/
108 #
109 # Set Header    = Referer: http://p.p/foo
110 # Expect Header = NO CHANGE
111 #
112 # Set Header    = Referer: p.p/
113 # Expect Header = Referer: http://p.p/
114 #
115 # Set Header    = Referer: p
116 # Expect Header = Referer: http://p.p/
117 #
118 # Set Header    = Referer: http://
119 # Expect Header = Referer: http://p.p/
120 #
121 # Set Header    = Referer: https://p.p/
122 # Expect Header = Referer: http://p.p/
123 {+hide-referrer{conditional-forge}}
124 TAG:^hide-referrer\{conditional-forge\}$
125
126 # Set Header    = Referer: http://www.example.org/foo 
127 # Expect Header = Referer: http://p.p/
128 {+hide-referrer{forge}}
129 TAG:^hide-referrer\{forge\}$
130
131 # Set Header    = Referer: http://www.example.org/foo 
132 # Expect Header = REMOVAL
133 {+hide-referrer{block}}
134 TAG:^hide-referrer\{block\}$
135
136 # Set Header    = Referer: http://www.example.org/foo 
137 # Expect Header = Referer: invalid
138 {+hide-referrer{invalid}}
139 TAG:^hide-referrer\{invalid\}$
140
141 # Set Header    = Referer: http://www.example.org/asdf
142 # Expect Header = Referer: http://www.privoxy.org/
143 {+hide-referrer{http://www.privoxy.org/}}
144 TAG:^hide-referrer\{http://www.privoxy.org/\}$
145
146 #{+hide-referrer{}}
147 #TAG:^hide-referrer\{\}$
148
149 #######################################################
150 # Test hide-user-agent{}.
151 #######################################################
152
153 # Set Header    = User-Agent: Mozilla/5.0 (X11; U; NetBSD i386; de-CH; rv:1.8.1.6) Gecko/20070806 Firefox/2.0.0.6
154 # Expect Header = User-Agent: Mozilla/5.0 (X11; U; FreeBSD alpha; en-GB; rv:1.8.1.6) Gecko/20070913 Firefox/2.0.0.6
155 {+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD alpha; en-GB; rv:1.8.1.6) Gecko/20070913 Firefox/2.0.0.6}}
156 TAG:^hide-user-agent\{Mozilla/5\.0 \(X11; U; FreeBSD alpha; en-GB; rv:1\.8\.1\.6\) Gecko/20070913 Firefox/2\.0\.0\.6\}$
157
158 # XXX: Check the code that is tested here.
159 # Set Header = ua-blah: blah
160 # Expect Header = REMOVAL
161 {+hide-user-agent{block}}
162 TAG:^hide-user-agent{block}$
163
164 # Set Header = ua-blah: blah
165 # Expect Header = NO CHANGE
166 {-hide-user-agent{}}
167 TAG:^-hide-user-agent{block}$
168
169
170 #######################################################
171 # Test add-header{}.
172 #######################################################
173
174 # Set Header    = X-Whatever: foo
175 # Expect Header = X-Custom-Header: yes, please
176
177 {+add-header{X-Custom-Header: yes, please}}
178 TAG:^add-header\{X-Custom-Header: yes, please\}$
179
180 #######################################################
181 # Test client-header-filter{hide-tor-exit-notation}.
182 #######################################################
183
184 # Set Header    = Referer: http://p.p.zwiebelsuppe.exit/
185 # Expect Header = Referer: http://p.p/
186 #
187 # Set Header    = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
188 # Expect Header = Referer: http://p.p/foo/bar/baaz/
189 #
190 # Set Header    = Referer: http://p.p/
191 # Expect Header = NO CHANGE
192 #
193 # Set Header    = Referer: http://config.privoxy.org.zwiebelsuppe.exit/foo/bar/baaz.html
194 # Expect Header = Referer: http://config.privoxy.org/foo/bar/baaz.html
195 #
196 # Set Header    = Host: p.p.zwiebelsuppe.exit
197 # Expect Header = Host: p.p
198 #
199 # Set Header    = Host: p.p
200 # Expect Header = NO CHANGE
201 #
202 # Set Header    = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
203 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
204
205 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
206 TAG:^client-header-filter\{hide-tor-exit-notation\}$
207
208 #######################################################
209 # Test crunch-client-header{}.
210 #######################################################
211
212 # Set Header    = Content-Type: text/html
213 # Expect Header = REMOVAL
214 #
215 # Set Header    = Content-Type: text/html; charset=4711
216 # Expect Header = REMOVAL
217 #
218 # Set Header    = Content-Type: text/plain
219 # Expect Header = NO CHANGE
220
221 {+crunch-client-header{text/html}}
222 TAG:^crunch-client-header\{text/plain\}$
223
224
225 #######################################################
226 # Test crunch-if-none-match.
227 #######################################################
228
229 # Set Header    = If-None-Match: 8987afd239d2093kd2309kd
230 # Expect Header = REMOVAL
231
232 # Set Header    = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
233 # Expect Header = REMOVAL
234
235 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
236 # Expect Header = NO CHANGE
237
238 {+crunch-if-none-match -hide-if-modified-since}
239 TAG:^crunch-if-none-match$
240
241 #######################################################
242 # Test hide-if-modified-since
243 #######################################################
244
245 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
246 # Expect Header = REMOVAL
247 #
248 # Set Header    = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
249 # Expect Header = NO CHANGE
250
251 {+hide-if-modified-since{block} -crunch-if-none-match}
252 TAG:^hide-if-modified-since\{block\}$
253
254 # Set Header    = If-Modified-Since: Gee, this date is invalid
255 # Expect Header = REMOVAL
256 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
257 # Expect Header = SOME CHANGE
258 # Set Header    = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
259 # Expect Header = SOME CHANGE
260 # Level = 17
261 # Set Header    = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
262 # Expect Header = REMOVAL
263 # Set Header    = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
264 # Expect Header = SOME CHANGE
265 # Level = 17
266 # Set Header    = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
267 # Expect Header = SOME CHANGE
268
269 {+hide-if-modified-since{-60} -crunch-if-none-match}
270 TAG:^hide-if-modified-since\{-60\}$
271
272 # Set Header    = If-Modified-Since: Gee, this date is invalid
273 # Expect Header = REMOVAL
274 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
275 # Expect Header = SOME CHANGE
276 # Set Header    = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
277 # Expect Header = SOME CHANGE
278
279 {+hide-if-modified-since{+60} -crunch-if-none-match}
280 TAG:^hide-if-modified-since\{\+60\}$
281
282 # Set Header    = If-Modified-Since: Gee, this date is invalid
283 # Expect Header = REMOVAL
284 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
285 # Expect Header = SOME CHANGE
286
287 {+hide-if-modified-since{60} -crunch-if-none-match}
288 TAG:^hide-if-modified-since\{60\}$
289
290 # Set Header    = If-Modified-Since: Gee, this date is invalid
291 # Expect Header = REMOVAL
292 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
293 # Expect Header = NO CHANGE
294
295 {+hide-if-modified-since{+0} -crunch-if-none-match}
296 TAG:^hide-if-modified-since\{\+0\}$
297
298 # Set Header    = If-Modified-Since: Gee, this date is invalid
299 # Expect Header = REMOVAL
300 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
301 # Expect Header = NO CHANGE
302
303 {+hide-if-modified-since{-0} -crunch-if-none-match}
304 TAG:^hide-if-modified-since\{-0\}$
305
306 # Set Header    = If-Modified-Since: Gee, this date is invalid
307 # Expect Header = REMOVAL
308 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
309 # Expect Header = NO CHANGE
310
311 {+hide-if-modified-since{0} -crunch-if-none-match}
312 TAG:^hide-if-modified-since\{0\}$
313
314 # Set Header    = If-Modified-Since: Gee, this date is invalid
315 # Expect Header = REMOVAL
316 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
317 # Expect Header = NO CHANGE
318
319 {+hide-if-modified-since{NaN} -crunch-if-none-match}
320 TAG:^hide-if-modified-since\{NaN\}$
321
322
323 #######################################################
324 # Test crunch-outgoing-cookies
325 #######################################################
326
327 # Set Header    = If-Modified-Since: Gee, this date is invalid
328 # Expect Header = NO CHANGE
329 #
330 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
331 # Expect Header = REMOVAL
332 {\
333  +crunch-outgoing-cookies \
334  -crunch-incoming-cookies \
335  -session-cookies-only    \
336  -hide-if-modified-since  \
337 }
338 TAG:^crunch-outgoing-cookies$
339
340 #######################################################
341 # Test session-cookies-only
342 #
343 # XXX: pretty useless as session-cookies-only doesn't
344 # affect client headers.
345 #######################################################
346
347 # Set Header    = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
348 # Expect Header = NO CHANGE
349 #
350 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
351 # Expect Header = NO CHANGE
352 {\
353  -crunch-outgoing-cookies \
354  -crunch-incoming-cookies \
355  +session-cookies-only    \
356  -hide-if-modified-since  \
357 }
358 TAG:^session-cookies-only$
359
360 #######################################################
361 # Test change-x-forwarded-for
362 #######################################################
363
364 # Set Header    = X-Forwarded-For: 10.0.0.1
365 # Expect Header = NO CHANGE
366 {\
367  -change-x-forwarded-for \
368 }
369 TAG:^-change-x-forwarded-for$
370
371 # Set Header    = X-Forwarded-For: 10.0.0.1
372 # Expect Header = REMOVAL
373 {\
374  +change-x-forwarded-for{block} \
375 }
376 TAG:^change-x-forwarded-for\{block\}$
377
378 # Set Header    = X-Forwarded-For: 10.0.0.1
379 # Expect Header = SOME CHANGE
380 {\
381  +change-x-forwarded-for{add} \
382 }
383 TAG:^change-x-forwarded-for\{add\}$
384
385 #######################################################
386 # Test hide-from-header
387 #######################################################
388
389 # Set Header    = From: schneewitchen@example.org
390 # Expect Header = REMOVAL
391 {\
392  +hide-from-header{block}\
393 }
394 TAG:^hide-from-header\{block\}$
395
396 # Set Header    = From: schneewitchen@example.org
397 # Expect Header = From: siebenzwerge@example.org
398 {\
399  +hide-from-header{siebenzwerge@example.org}\
400 }
401 TAG:^hide-from-header\{siebenzwerge@example.org\}$
402
403 #######################################################
404 # Test prevent-compression
405 #######################################################
406
407 # Set Header    = Accept-Encoding: gzip, deflate
408 # Expect Header = REMOVAL
409 #
410 # Set Header    = Accept-Encoding: gzip
411 # Expect Header = REMOVAL
412 #
413 # Set Header    = Accept-Encoding: deflate
414 # Expect Header = REMOVAL
415 {\
416  +prevent-compression\
417 }
418 TAG:^prevent-compression$
419
420 #######################################################
421 # Test content filters which could cause problems with
422 # range requests.
423 #######################################################
424
425 # Set Header    = Range: bytes=1234-5678
426 # Expect Header = REMOVAL
427 # Set Header    = If-Range: bytes=1234-5678
428 # Expect Header = REMOVAL
429 # Set Header    = Request-Range: bytes=1234-5678
430 # Expect Header = REMOVAL
431 {\
432  +deanimate-gifs{last} \
433  -filter \
434 }
435 TAG:^deanimate-gifs\{last\}$
436
437 # Set Header    = Range: bytes=1234-5678
438 # Expect Header = REMOVAL
439 # Set Header    = If-Range: bytes=1234-5678
440 # Expect Header = REMOVAL
441 # Set Header    = Request-Range: bytes=1234-5678
442 # Expect Header = REMOVAL
443 {\
444  -deanimate-gifs \
445  +filter{banners-by-size} \
446 }
447 TAG:^filter\{banners-by-size\}$
448
449 # Set Header    = Range: bytes=1234-5678
450 # Expect Header = NO CHANGE
451 # Set Header    = If-Range: bytes=1234-5678
452 # Expect Header = NO CHANGE
453 # Set Header    = Request-Range: bytes=1234-5678
454 # Expect Header = NO CHANGE
455 {\
456  -deanimate-gifs \
457  -filter \
458 }
459 TAG:^no-content-filter$
460
461 # Set Header    = Connection: keep-alive
462 # Expect Header = NO CHANGE
463 # Level = 13
464 # Set Header    = Connection:
465 # Expect Header = REMOVAL
466 # Level = 13
467 {}
468 TAG:^Connection: keep-alive$
469
470 # Set Header    = Connection: keep-alive
471 # Expect Header = Connection: close
472 # Level = 14
473 # Set Header    = Connection:
474 # Expect Header = Connection: close
475 # Level = 14
476 {}
477 TAG:^Connection: close$
478
479 # Set Header    = Connection: close
480 # Expect Header = NO CHANGE
481 # Level = 15
482 {}
483 TAG:^connection-sharing disabled$
484
485 # Set Header    = Connection: close
486 # Expect Header = REMOVAL
487 # Level = 16
488 # Set Header    = Connection: keep-alive
489 # Expect Header = NO CHANGE
490 # Level = 16
491 {}
492 TAG:^connection-sharing enabled$
493
494 # XXX: Removing a header by not specifying a value is
495 # an inherited curl feature and could be viewed as a
496 # bug as far as Privoxy-Regression-Test is concerned.
497 #
498 # Set Header    = Host:
499 # Expect Header = Host: p.p
500 {}
501 TAG:^No Host header$
502
503 # Set Header    = Host: whatever.example.org
504 # Expect Header = NO CHANGE
505 {}
506 TAG:^Host header other than the target host$
507
508 # Set Header = Keep-Alive: 20
509 # Expect Header = NO CHANGE
510 # Level = 13
511 {}
512 TAG:^Pass Keep-Alive header$
513
514 # Set Header = Keep-Alive: 20
515 # Expect Header = REMOVAL
516 # Level = 14
517 {}
518 TAG:^Keep-Alive header removal$
519
520 # XXX: check the RFC to use a real value
521 # Set Header = proxy-connection: keep-alive
522 # Expect Header = REMOVAL
523 {}
524 TAG:^Proxy-Connection removal$
525
526 # Set Header = Proxy-Connection: keep-alive
527 # Expect Header = REMOVAL
528 {}
529 TAG:^Proxy-Connection removal$
530
531 # These are somewhat redundant when testing with
532 # GET requests, but I want to remember then when
533 # TRACE requests are supported.
534 #
535 # Set Header = Max-Forwards: 0
536 # Expect Header = NO CHANGE
537 # Set Header = Max-Forwards: 1
538 # Expect Header = NO CHANGE
539 # Set Header = Max-Forwards: -1
540 # Expect Header = NO CHANGE
541 # Set Header = Max-Forwards: 3
542 # Expect Header = NO CHANGE
543 {}
544 TAG:^Max-Forwards header without TRACE method$
545
546 ################################################################
547 #
548 # Fairly dumb tests for Privoxy CGI pages.
549 #
550 # These are mainly useful for checking for memory leaks
551 # with Valgrind or whether or not the user manual is installed
552 # correctly and are unlikely to actually detect any
553 #
554 # Note that if "Expect Status Code" is missing, 200 is implied.
555 #
556 ################################################################
557
558 # Fetch Test = http://p.p/
559 # Will fail if compiled with FEATURE_GRACEFUL_TERMINATION
560 # Fetch Test = http://p.p/die
561 # Expect Status Code = 404
562 # Fetch Test = http://p.p/show-status
563 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
564 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
565 # XXX: for the invalid ones we probably shouldn't return status code 200.
566 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
567 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
568 # Fetch Test = http://config.privoxy.org/show-status?file=actions
569 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
570 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
571 # Fetch Test = http://config.privoxy.org/show-status?file=filter
572 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
573 # Fetch Test = http://config.privoxy.org/show-status?file=trust
574 # Fetch Test = http://p.p/show-version
575 # Fetch Test = http://p.p/show-request
576 # Fetch Test = http://p.p/show-url-info
577 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
578 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
579 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
580 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
581 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
582 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
583 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
584 # Fetch Test = http://p.p/show-url-info?url=
585 # Fetch Test = http://p.p/show-url-info?url=%2F
586 # Fetch Test = http://p.p/toggle
587 # Fetch Test = http://p.p/edit-actions
588 # Fetch Test = http://p.p/eaa
589 # Fetch Test = http://p.p/eau
590 # Fetch Test = http://p.p/ear
591 # Fetch Test = http://p.p/eal
592 # Fetch Test = http://p.p/eafu
593 # Fetch Test = http://p.p/eas
594 # Fetch Test = http://p.p/easa
595 # Fetch Test = http://p.p/easr
596 # Fetch Test = http://p.p/eass
597 # Fetch Test = http://p.p/edit-actions-for-url
598 # Fetch Test = http://p.p/edit-actions-list
599 # Fetch Test = http://p.p/edit-actions-submit
600 # Fetch Test = http://p.p/edit-actions-url
601 # Fetch Test = http://p.p/edit-actions-url-form
602 # Fetch Test = http://p.p/edit-actions-add-url
603 # Fetch Test = http://p.p/edit-actions-add-url-form
604 # Fetch Test = http://p.p/edit-actions-remove-url
605 # Fetch Test = http://p.p/edit-actions-remove-url-form
606 # Fetch Test = http://p.p/edit-actions-section-add
607 # Fetch Test = http://p.p/edit-actions-section-remove
608 # Fetch Test = http://p.p/edit-actions-section-swap
609 # Fetch Test = http://p.p/error-favicon.ico
610 # Fetch Test = http://p.p/favicon.ico
611 # Fetch Test = http://p.p/robots.txt
612 # Fetch Test = http://p.p/send-banner
613 # Fetch Test = http://p.p/send-stylesheet
614 # Fetch Test = http://p.p/t
615 # Fetch Test = http://p.p/url-info-osd.xml
616
617 # Trusted CGI Request = http://p.p/edit-actions
618 # Expect Status Code = 302
619 # Level = 12 # Depends on the CGI editor being enabled
620 # Fetch Test = http://p.p/does-not-exist
621 # Expect Status Code = 404
622 # Trusted CGI Request = http://p.p/eaa
623 # Trusted CGI Request = http://p.p/eau
624 # Trusted CGI Request = http://p.p/ear
625 # Trusted CGI Request = http://p.p/eal
626 # Trusted CGI Request = http://p.p/eafu
627 # Trusted CGI Request = http://p.p/eas
628 # Trusted CGI Request = http://p.p/easa
629 # Trusted CGI Request = http://p.p/easr
630 # Trusted CGI Request = http://p.p/eass
631 # Trusted CGI Request = http://p.p/edit-actions-for-url
632 # Trusted CGI Request = http://p.p/edit-actions-list
633 # Trusted CGI Request = http://p.p/edit-actions-submit
634 # Trusted CGI Request = http://p.p/edit-actions-url
635 # Trusted CGI Request = http://p.p/edit-actions-url-form
636 # Trusted CGI Request = http://p.p/edit-actions-add-url
637 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
638 # Trusted CGI Request = http://p.p/edit-actions-remove-url
639 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
640 # Trusted CGI Request = http://p.p/edit-actions-section-add
641 # Trusted CGI Request = http://p.p/edit-actions-section-remove
642 # Trusted CGI Request = http://p.p/edit-actions-section-swap
643 # Trusted CGI Request = http://p.p/send-stylesheet
644
645 # The following tests depend on Privoxy being configured to deliver the user manual
646
647 # Fetch Test = http://p.p/user-manual
648 # Expect Status Code = 302
649 # Level = 9
650 # Fetch Test = http://p.p/user-manual/
651 # Level = 9
652 # Fetch Test = http://p.p/user-manual/actions-file.html
653 # Level = 9
654 # Fetch Test = http://p.p/user-manual/appendix.html
655 # Level = 9
656 # Fetch Test = http://p.p/user-manual/config.html
657 # Level = 9
658 # Fetch Test = http://p.p/user-manual/configuration.html
659 # Level = 9
660 # Fetch Test = http://p.p/user-manual/contact.html
661 # Level = 9
662 # Fetch Test = http://p.p/user-manual/copyright.html
663 # Level = 9
664 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
665 # Level = 9
666 # Fetch Test = http://p.p/user-manual/filter-file.html
667 # Level = 9
668 # Fetch Test = http://p.p/user-manual/index.html
669 # Level = 9
670 # Fetch Test = http://p.p/user-manual/installation.html
671 # Level = 9
672 # Fetch Test = http://p.p/user-manual/introduction.html
673 # Level = 9
674 # Fetch Test = http://p.p/user-manual/p_doc.css
675 # Level = 9
676 # Fetch Test = http://p.p/user-manual/proxy2.jpg
677 # Level = 9
678 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
679 # Level = 9
680 # Fetch Test = http://p.p/user-manual/quickstart.html
681 # Level = 9
682 # Fetch Test = http://p.p/user-manual/seealso.html
683 # Level = 9
684 # Fetch Test = http://p.p/user-manual/startup.html
685 # Level = 9
686 # Fetch Test = http://p.p/user-manual/templates.html
687 # Level = 9
688 # Fetch Test = http://p.p/user-manual/whatsnew.html
689 # Level = 9
690
691
692 # Method Test = OPTIONS
693 # Method Test = GET
694 # Method Test = get
695 # Method Test = gEt
696 # Method Test = HEAD
697 # Method Test = POST
698 # Method Test = PUT
699 # Method Test = DELETE
700 # Method Test = OPTIONS
701 # Method Test = TRACE
702 # Method Test = CONNECT
703 # Method Test = PROPFIND
704 # Method Test = PROPPATCH
705 # Method Test = MOVE
706 # Method Test = COPY
707 # Method Test = MKCOL
708 # Method Test = LOCK
709 # Method Test = UNLOCK
710 # Method Test = BCOPY
711 # Method Test = BMOVE
712 # Method Test = BDELETE
713 # Method Test = BPROPFIND
714 # Method Test = BPROPPATCH
715 # Method Test = SUBSCRIBE
716 # Method Test = UNSUBSCRIBE
717 # Method Test = NOTIFY
718 # Method Test = POLL
719 # Method Test = VERSION-CONTROL
720 # Method Test = REPORT
721 # Method Test = CHECKOUT
722 # Method Test = CHECKIN
723 # Method Test = UNCHECKOUT
724 # Method Test = MKWORKSPACE
725 # Method Test = UPDATE
726 # Method Test = LABEL
727 # Method Test = MERGE
728 # Method Test = BASELINE-CONTROL
729 # Method Test = MKACTIVITY
730 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
731 # Expect Status Code = 400
732
733 {+block{Forbidden Port. You are not supposed to see this.}}
734 config.privoxy.org:1-/
735 p.p:1-/
736
737 {-block}
738 config.privoxy.org:3,79-81/
739 p.p:3,22,79-81/
740
741 # Fetch Test = http://oh-dear-this-hostname-is-so-very-long-that-it-can-not-possibly-be-forwarded-through-socks5-as-a-result-we-therefore-expect-privoxy-to-return-an-error-response-instead-of-forwarding-the-request-because-as-already-mentioned-this-host-is-really-very-long.example
742 # Expect Status Code = 503
743 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
744 oh-dear-this-hostname-is-so-very-long-that-it-can-not-possibly-be-forwarded-through-socks5-as-a-result-we-therefore-expect-privoxy-to-return-an-error-response-instead-of-forwarding-the-request-because-as-already-mentioned-this-host-is-really-very-long.example/
745
746 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
747 # Expect Status Code = 503
748 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
749 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
750
751 # This one currently triggers the same error condition as the
752 # test above (socks5 server unreachable), but once Privoxy
753 # starts to properly reject invalid ports it should become useful.
754
755 # Fetch Test = http://invalid-forward5-gateway-port.example
756 # Expect Status Code = 503
757 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
758 invalid-forward5-gateway-port.example
759
760 # Fetch Test = http://forward5-null-gateway-host.example
761 # Expect Status Code = 503
762 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
763 forward5-null-gateway-host.example
764
765 # Fetch Test = http://www.forbidden-connect.example:444/
766 # Method = CONNECT
767 # Expect Status Code = 403
768 {+limit-connect{443}}
769 www.forbidden-connect.example/
770
771 # Fetch Test = http://www.blocked-request.example/blocked-request
772 # Expect Status Code = 403
773 {+block{This request failed to make it to the target destination which means the test succeeded.}}
774 www.blocked-request.example/blocked-request
775
776 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
777 # Expect Status Code = 403
778 {+block}
779 www.blocked-request.example/blocked-request-with-no-reason-specified
780
781 # Some domain pattern tests
782 #
783 {+block{domain pattern test}}
784 # Blocked URL = http://domain-pattern-test.example/
785 # Blocked URL = http://domain-pattern-test.example.org/
786 domain-pattern-test.example.
787
788 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
789 # Blocked URL = http://trailing-dot.example.org./
790 # Blocked URL = http://trailing-dot.example.org./foo
791 trailing-dot.example.org
792
793 # Just in case there is no white-space fuzzer in the house ...
794 #
795 # Set Header = X-LWS-Test: no superfluous white space here
796 # Expect Header = NO CHANGE
797 # Set Header = X-LWS-Test:  superfluous   white space  in  the   house
798 # Expect Header = X-LWS-Test: superfluous white space in the house
799 # Set Header = X-LWS-Test   :  superfluous   white   space   in   the    house
800 # Expect Header = X-LWS-Test: superfluous white space in the house
801 # Set Header = X-LWS-Test:  :superfluous white space in the house
802 # Expect Header = X-LWS-Test: :superfluous white space in the house
803 # Set Header = X-LWS-Test: :no superfluous white space here
804 # Expect Header = NO CHANGE
805 # Set Header = X-LWS-Test:      superfluous             white                   tabs in the house
806 # Expect Header = X-LWS-Test: superfluous white tabs in the house
807 # Set Header = X-LWS-Test       :       superfluous             white                   tabs in the house
808 # Expect Header = X-LWS-Test: superfluous white tabs in the house
809 # Set Header = X-LWS-Test: "leave  quoted  lws alone"
810 # Expect Header = X-LWS-Test: "leave  quoted  lws alone"
811 # Set Header = X-LWS-Test:  "leave  quoted  lws alone"  thxbye
812 # Expect Header = X-LWS-Test: "leave  quoted  lws alone" thxbye
813 # Set Header = X-LWS-Test: " Do I Look like     quoted  text? Me    thinks  not.
814 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
815 # Set Header = X-LWS-Test: "This  is  quoted" this  is  not "but   this  is  again"
816 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "but   this  is  again"
817 # Set Header = X-LWS-Test:  "This  is  quoted" this   is  not "this  is  "  but  "  this again   is  not
818 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "this  is  " but " this again is not
819 {}
820 TAG:^LWS Tests$