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