1 #############################################################################
2 # $Id: regression-tests.action,v 1.43 2012/04/06 15:17:41 fabiankeil Exp $
3 #############################################################################
5 # This is a configuration file for Privoxy-Regression-Test
6 # (included in the source tarball's tools directory).
8 # After referencing it in your Privoxy configuration both Privoxy and
9 # Privoxy-Regression-Test should be good to go.
11 #############################################################################
13 # Copyright (c) 2007-2012 Fabian Keil <fk@fabiankeil.de>
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.
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.
27 #############################################################################
29 # While the syntax used is understood by Privoxy 3.0.14 and later,
30 # some of the +fast-redirects{} tests require at least 3.0.20 to work.
32 for-privoxy-version=3.0.20
34 # Some dependencies Privoxy-Regression-Test should know about:
36 # Level 9 needs = config line user-manual\s+(\.?\.?/|[A-Za-z]:)
37 # Level 12 needs = config line enable-edit-actions\s+1
38 # Level 13 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
39 # Level 13 needs = config line keep-alive-timeout\s+[1-9]+
40 # Level 14 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE No
41 # Level 15 needs = config line connection-sharing\s+0
42 # Level 16 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
43 # Level 16 needs = config line connection-sharing\s+1
44 # Level 17 needs = feature status FEATURE_PTHREAD Yes
45 # Level 18 needs = feature status FEATURE_GRACEFUL_TERMINATION No
46 # Level 19 needs = feature status FEATURE_GRACEFUL_TERMINATION Yes
47 # Level 20 needs = feature status FEATURE_TOGGLE Yes
48 # Level 21 needs = feature status FEATURE_TOGGLE No
50 #######################################################
51 # Enable taggers to activate the tests on demand
52 # and suppress hiding the User-Agent for
53 # Privoxy-Regression-Test to save log space.
54 #######################################################
56 +client-header-tagger{user-agent} \
57 +client-header-tagger{privoxy-control} \
58 +client-header-filter{privoxy-control} \
65 TAG:^User-Agent: Privoxy-Regression-Test
67 #######################################################
68 # Test accept-language{}.
69 #######################################################
71 # Set Header = Accept-Language: de-de
72 # Expect Header = Accept-Language: en-gb
73 {+hide-accept-language{en-gb}}
74 TAG:^hide-accept-language\{en-gb\}$
76 # Set Header = Accept-Language: de-de
77 # Expect Header = REMOVAL
78 {+hide-accept-language{block}}
79 TAG:^hide-accept-language\{block\}$
81 #######################################################
82 # Sections for hide-referrer{} to test:
84 # 1) conditional-block
85 # 2) conditional-forge
88 # 5) a parameter that looks like a valid fake referrer
89 # 6) a parameter that looks like an invalid fake referrer
90 #######################################################
92 # Set Header = Referer: http://www.example.org/foo
93 # Expect Header = REMOVAL
95 # Set Header = Referer: http://p.p/foo
96 # Expect Header = NO CHANGE
98 # Set Header = Referer: p.p/
99 # Expect Header = REMOVAL
101 # Set Header = Referer: p
102 # Expect Header = REMOVAL
104 # Set Header = Referer: http://
105 # Expect Header = REMOVAL
107 # Set Header = Referer: https://p.p/
108 # Expect Header = REMOVAL
109 {+hide-referrer{conditional-block}}
110 TAG:^hide-referrer\{conditional-block\}$
112 # Set Header = Referer: http://www.example.org/foo
113 # Expect Header = Referer: http://p.p/
115 # Set Header = Referer: http://p.p/foo
116 # Expect Header = NO CHANGE
118 # Set Header = Referer: p.p/
119 # Expect Header = Referer: http://p.p/
121 # Set Header = Referer: p
122 # Expect Header = Referer: http://p.p/
124 # Set Header = Referer: http://
125 # Expect Header = Referer: http://p.p/
127 # Set Header = Referer: https://p.p/
128 # Expect Header = Referer: http://p.p/
129 {+hide-referrer{conditional-forge}}
130 TAG:^hide-referrer\{conditional-forge\}$
132 # Set Header = Referer: http://www.example.org/foo
133 # Expect Header = Referer: http://p.p/
134 {+hide-referrer{forge}}
135 TAG:^hide-referrer\{forge\}$
137 # Set Header = Referer: http://www.example.org/foo
138 # Expect Header = REMOVAL
139 {+hide-referrer{block}}
140 TAG:^hide-referrer\{block\}$
142 # Set Header = Referer: http://www.example.org/foo
143 # Expect Header = Referer: invalid
144 {+hide-referrer{invalid}}
145 TAG:^hide-referrer\{invalid\}$
147 # Set Header = Referer: http://www.example.org/asdf
148 # Expect Header = Referer: http://www.privoxy.org/
149 {+hide-referrer{http://www.privoxy.org/}}
150 TAG:^hide-referrer\{http://www.privoxy.org/\}$
153 #TAG:^hide-referrer\{\}$
155 #######################################################
156 # Test hide-user-agent{}.
157 #######################################################
159 # 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
160 # 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
161 {+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD alpha; en-GB; rv:1.8.1.6) Gecko/20070913 Firefox/2.0.0.6}}
162 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\}$
164 # XXX: Check the code that is tested here.
165 # Set Header = ua-blah: blah
166 # Expect Header = REMOVAL
167 {+hide-user-agent{block}}
168 TAG:^hide-user-agent{block}$
170 # Set Header = ua-blah: blah
171 # Expect Header = NO CHANGE
173 TAG:^-hide-user-agent{block}$
176 #######################################################
178 #######################################################
180 # Set Header = X-Whatever: foo
181 # Expect Header = X-Custom-Header: yes, please
183 {+add-header{X-Custom-Header: yes, please}}
184 TAG:^add-header\{X-Custom-Header: yes, please\}$
186 #######################################################
187 # Test client-header-filter{hide-tor-exit-notation}.
188 #######################################################
190 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/
191 # Expect Header = Referer: http://p.p/
193 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
194 # Expect Header = Referer: http://p.p/foo/bar/baaz/
196 # Set Header = Referer: http://p.p/
197 # Expect Header = NO CHANGE
199 # Set Header = Referer: http://config.privoxy.org.zwiebelsuppe.exit/foo/bar/baaz.html
200 # Expect Header = Referer: http://config.privoxy.org/foo/bar/baaz.html
202 # Set Header = Host: p.p.zwiebelsuppe.exit
203 # Expect Header = Host: p.p
205 # Set Header = Host: p.p
206 # Expect Header = NO CHANGE
208 # Set Header = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
209 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
211 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
212 TAG:^client-header-filter\{hide-tor-exit-notation\}$
214 #######################################################
215 # Test crunch-client-header{}.
216 #######################################################
218 # Set Header = Content-Type: text/html
219 # Expect Header = REMOVAL
221 # Set Header = Content-Type: text/html; charset=4711
222 # Expect Header = REMOVAL
224 # Set Header = Content-Type: text/plain
225 # Expect Header = NO CHANGE
227 {+crunch-client-header{text/html}}
228 TAG:^crunch-client-header\{text/plain\}$
231 #######################################################
232 # Test crunch-if-none-match.
233 #######################################################
235 # Set Header = If-None-Match: 8987afd239d2093kd2309kd
236 # Expect Header = REMOVAL
238 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
239 # Expect Header = REMOVAL
241 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
242 # Expect Header = NO CHANGE
244 {+crunch-if-none-match -hide-if-modified-since}
245 TAG:^crunch-if-none-match$
247 #######################################################
248 # Test hide-if-modified-since
249 #######################################################
251 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
252 # Expect Header = REMOVAL
254 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
255 # Expect Header = NO CHANGE
257 {+hide-if-modified-since{block} -crunch-if-none-match}
258 TAG:^hide-if-modified-since\{block\}$
260 # Set Header = If-Modified-Since: Gee, this date is invalid
261 # Expect Header = REMOVAL
262 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
263 # Expect Header = SOME CHANGE
264 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
265 # Expect Header = SOME CHANGE
267 # Set Header = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
268 # Expect Header = REMOVAL
269 # Set Header = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
270 # Expect Header = SOME CHANGE
272 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
273 # Expect Header = SOME CHANGE
275 {+hide-if-modified-since{-60} -crunch-if-none-match}
276 TAG:^hide-if-modified-since\{-60\}$
278 # Set Header = If-Modified-Since: Gee, this date is invalid
279 # Expect Header = REMOVAL
280 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
281 # Expect Header = SOME CHANGE
282 # Set Header = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
283 # Expect Header = SOME CHANGE
285 {+hide-if-modified-since{+60} -crunch-if-none-match}
286 TAG:^hide-if-modified-since\{\+60\}$
288 # Set Header = If-Modified-Since: Gee, this date is invalid
289 # Expect Header = REMOVAL
290 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
291 # Expect Header = SOME CHANGE
293 {+hide-if-modified-since{60} -crunch-if-none-match}
294 TAG:^hide-if-modified-since\{60\}$
296 # Set Header = If-Modified-Since: Gee, this date is invalid
297 # Expect Header = REMOVAL
298 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
299 # Expect Header = NO CHANGE
301 {+hide-if-modified-since{+0} -crunch-if-none-match}
302 TAG:^hide-if-modified-since\{\+0\}$
304 # Set Header = If-Modified-Since: Gee, this date is invalid
305 # Expect Header = REMOVAL
306 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
307 # Expect Header = NO CHANGE
309 {+hide-if-modified-since{-0} -crunch-if-none-match}
310 TAG:^hide-if-modified-since\{-0\}$
312 # Set Header = If-Modified-Since: Gee, this date is invalid
313 # Expect Header = REMOVAL
314 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
315 # Expect Header = NO CHANGE
317 {+hide-if-modified-since{0} -crunch-if-none-match}
318 TAG:^hide-if-modified-since\{0\}$
320 # Set Header = If-Modified-Since: Gee, this date is invalid
321 # Expect Header = REMOVAL
322 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
323 # Expect Header = NO CHANGE
325 {+hide-if-modified-since{NaN} -crunch-if-none-match}
326 TAG:^hide-if-modified-since\{NaN\}$
329 #######################################################
330 # Test crunch-outgoing-cookies
331 #######################################################
333 # Set Header = If-Modified-Since: Gee, this date is invalid
334 # Expect Header = NO CHANGE
336 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
337 # Expect Header = REMOVAL
339 +crunch-outgoing-cookies \
340 -crunch-incoming-cookies \
341 -session-cookies-only \
342 -hide-if-modified-since \
344 TAG:^crunch-outgoing-cookies$
346 #######################################################
347 # Test session-cookies-only
349 # XXX: pretty useless as session-cookies-only doesn't
350 # affect client headers.
351 #######################################################
353 # Set Header = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
354 # Expect Header = NO CHANGE
356 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
357 # Expect Header = NO CHANGE
359 -crunch-outgoing-cookies \
360 -crunch-incoming-cookies \
361 +session-cookies-only \
362 -hide-if-modified-since \
364 TAG:^session-cookies-only$
366 #######################################################
367 # Test change-x-forwarded-for
368 #######################################################
370 # Set Header = X-Forwarded-For: 10.0.0.1
371 # Expect Header = NO CHANGE
373 -change-x-forwarded-for \
375 TAG:^-change-x-forwarded-for$
377 # Set Header = X-Forwarded-For: 10.0.0.1
378 # Expect Header = REMOVAL
380 +change-x-forwarded-for{block} \
382 TAG:^change-x-forwarded-for\{block\}$
384 # Set Header = X-Forwarded-For: 10.0.0.1
385 # Expect Header = SOME CHANGE
387 +change-x-forwarded-for{add} \
389 TAG:^change-x-forwarded-for\{add\}$
391 #######################################################
392 # Test hide-from-header
393 #######################################################
395 # Set Header = From: schneewitchen@example.org
396 # Expect Header = REMOVAL
398 +hide-from-header{block}\
400 TAG:^hide-from-header\{block\}$
402 # Set Header = From: schneewitchen@example.org
403 # Expect Header = From: siebenzwerge@example.org
405 +hide-from-header{siebenzwerge@example.org}\
407 TAG:^hide-from-header\{siebenzwerge@example.org\}$
409 #######################################################
410 # Test prevent-compression
411 #######################################################
413 # Set Header = Accept-Encoding: gzip, deflate
414 # Expect Header = REMOVAL
416 # Set Header = Accept-Encoding: gzip
417 # Expect Header = REMOVAL
419 # Set Header = Accept-Encoding: deflate
420 # Expect Header = REMOVAL
422 +prevent-compression\
424 TAG:^prevent-compression$
426 #######################################################
427 # Test content filters which could cause problems with
429 #######################################################
431 # Set Header = Range: bytes=1234-5678
432 # Expect Header = REMOVAL
433 # Set Header = Range: bytes=1-5
434 # Expect Header = REMOVAL
435 # Set Header = If-Range: bytes=1234-5678
436 # Expect Header = REMOVAL
437 # Set Header = Request-Range: bytes=1234-5678
438 # Expect Header = REMOVAL
439 # Set Header = Range: bytes=0-5678
440 # Expect Header = NO CHANGE
441 # Set Header = Range: bytes=0-
442 # Expect Header = NO CHANGE
443 # Set Header = If-Range: bytes=0-5678
444 # Expect Header = NO CHANGE
445 # Set Header = If-Range: bytes=0-
446 # Expect Header = NO CHANGE
447 # Set Header = Request-Range: bytes=0-5678
448 # Expect Header = NO CHANGE
449 # Set Header = Request-Range: bytes=0-
450 # Expect Header = NO CHANGE
452 -client-header-tagger{range-requests} \
453 +deanimate-gifs{last} \
456 TAG:^deanimate-gifs\{last\}$
458 # Set Header = Range: bytes=1234-5678
459 # Expect Header = REMOVAL
460 # Set Header = Range: bytes=1-5
461 # Expect Header = REMOVAL
462 # Set Header = If-Range: bytes=1234-5678
463 # Expect Header = REMOVAL
464 # Set Header = Request-Range: bytes=1234-5678
465 # Expect Header = REMOVAL
466 # Set Header = Range: bytes=0-5678
467 # Expect Header = NO CHANGE
468 # Set Header = Range: bytes=0-
469 # Expect Header = NO CHANGE
470 # Set Header = If-Range: bytes=0-5678
471 # Expect Header = NO CHANGE
472 # Set Header = If-Range: bytes=0-
473 # Expect Header = NO CHANGE
474 # Set Header = Request-Range: bytes=0-5678
475 # Expect Header = NO CHANGE
476 # Set Header = Request-Range: bytes=0-
477 # Expect Header = NO CHANGE
479 -client-header-tagger{range-requests} \
481 +filter{banners-by-size} \
483 TAG:^filter\{banners-by-size\}$
485 # Set Header = Range: bytes=1234-5678
486 # Expect Header = NO CHANGE
487 # Set Header = If-Range: bytes=1234-5678
488 # Expect Header = NO CHANGE
489 # Set Header = Request-Range: bytes=1234-5678
490 # Expect Header = NO CHANGE
492 -client-header-tagger{range-requests} \
496 TAG:^no-content-filter$
498 # Set Header = Connection: keep-alive
499 # Expect Header = NO CHANGE
501 # Set Header = Connection:
502 # Expect Header = REMOVAL
505 TAG:^Connection: keep-alive$
507 # Set Header = Connection: keep-alive
508 # Expect Header = Connection: close
510 # Set Header = Connection:
511 # Expect Header = Connection: close
514 TAG:^Connection: close$
516 # Set Header = Connection: close
517 # Expect Header = NO CHANGE
520 TAG:^connection-sharing disabled$
522 # Set Header = Connection: close
523 # Expect Header = REMOVAL
525 # Set Header = Connection: keep-alive
526 # Expect Header = NO CHANGE
529 TAG:^connection-sharing enabled$
531 # XXX: Removing a header by not specifying a value is
532 # an inherited curl feature and could be viewed as a
533 # bug as far as Privoxy-Regression-Test is concerned.
536 # Expect Header = Host: p.p
540 # Set Header = Host: whatever.example.org
541 # Expect Header = NO CHANGE
543 TAG:^Host header other than the target host$
545 # Set Header = Keep-Alive: 20
546 # Expect Header = NO CHANGE
549 TAG:^Pass Keep-Alive header$
551 # Set Header = Keep-Alive: 20
552 # Expect Header = REMOVAL
555 TAG:^Keep-Alive header removal$
557 # XXX: check the RFC to use a real value
558 # Set Header = proxy-connection: keep-alive
559 # Expect Header = REMOVAL
561 TAG:^Proxy-Connection removal$
563 # Set Header = Proxy-Connection: keep-alive
564 # Expect Header = REMOVAL
566 TAG:^Proxy-Connection removal$
568 # These are somewhat redundant when testing with
569 # GET requests, but I want to remember then when
570 # TRACE requests are supported.
572 # Set Header = Max-Forwards: 0
573 # Expect Header = NO CHANGE
574 # Set Header = Max-Forwards: 1
575 # Expect Header = NO CHANGE
576 # Set Header = Max-Forwards: -1
577 # Expect Header = NO CHANGE
578 # Set Header = Max-Forwards: 3
579 # Expect Header = NO CHANGE
581 TAG:^Max-Forwards header without TRACE method$
583 ################################################################
585 # Fairly dumb tests for Privoxy CGI pages.
587 # These are mainly useful for checking for memory leaks
588 # with Valgrind or whether or not the user manual is installed
589 # correctly and are unlikely to actually detect any
591 # Note that if "Expect Status Code" is missing, 200 is implied.
593 ################################################################
595 # Fetch Test = http://p.p/
596 # Fetch Test = http://p.p/die
597 # Expect Status Code = 404
599 # Fetch Test = http://p.p/die
600 # Expect Status Code = 200
602 # Fetch Test = http://p.p/show-status
603 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
604 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
605 # XXX: for the invalid ones we probably shouldn't return status code 200.
606 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
607 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
608 # Fetch Test = http://config.privoxy.org/show-status?file=actions
609 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
610 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
611 # Fetch Test = http://config.privoxy.org/show-status?file=filter
612 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
613 # Fetch Test = http://config.privoxy.org/show-status?file=trust
614 # Fetch Test = http://p.p/show-version
615 # Fetch Test = http://p.p/show-request
616 # Fetch Test = http://p.p/show-url-info
617 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
618 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
619 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
620 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
621 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
622 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
623 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
624 # Fetch Test = http://p.p/show-url-info?url=
625 # Fetch Test = http://p.p/show-url-info?url=%2F
626 # Depends on FEATURE_TOGGLE
627 # Fetch Test = http://p.p/toggle
629 # Fetch Test = http://p.p/toggle
630 # Expect Status Code = 404
632 # Fetch Test = http://p.p/edit-actions
633 # Fetch Test = http://p.p/eaa
634 # Fetch Test = http://p.p/eau
635 # Fetch Test = http://p.p/ear
636 # Fetch Test = http://p.p/eal
637 # Fetch Test = http://p.p/eafu
638 # Fetch Test = http://p.p/eas
639 # Fetch Test = http://p.p/easa
640 # Fetch Test = http://p.p/easr
641 # Fetch Test = http://p.p/eass
642 # Fetch Test = http://p.p/edit-actions-for-url
643 # Fetch Test = http://p.p/edit-actions-list
644 # Fetch Test = http://p.p/edit-actions-submit
645 # Fetch Test = http://p.p/edit-actions-url
646 # Fetch Test = http://p.p/edit-actions-url-form
647 # Fetch Test = http://p.p/edit-actions-add-url
648 # Fetch Test = http://p.p/edit-actions-add-url-form
649 # Fetch Test = http://p.p/edit-actions-remove-url
650 # Fetch Test = http://p.p/edit-actions-remove-url-form
651 # Fetch Test = http://p.p/edit-actions-section-add
652 # Fetch Test = http://p.p/edit-actions-section-remove
653 # Fetch Test = http://p.p/edit-actions-section-swap
654 # Fetch Test = http://p.p/error-favicon.ico
655 # Fetch Test = http://p.p/favicon.ico
656 # Fetch Test = http://p.p/robots.txt
657 # Fetch Test = http://p.p/send-banner
658 # Fetch Test = http://p.p/send-stylesheet
659 # Fetch Test = http://p.p/t
660 # Fetch Test = http://p.p/url-info-osd.xml
662 # Trusted CGI Request = http://p.p/edit-actions
663 # Expect Status Code = 302
664 # Level = 12 # Depends on the CGI editor being enabled
665 # Fetch Test = http://p.p/does-not-exist
666 # Expect Status Code = 404
667 # Trusted CGI Request = http://p.p/eaa
668 # Trusted CGI Request = http://p.p/eau
669 # Trusted CGI Request = http://p.p/ear
670 # Trusted CGI Request = http://p.p/eal
671 # Trusted CGI Request = http://p.p/eafu
672 # Trusted CGI Request = http://p.p/eas
673 # Trusted CGI Request = http://p.p/easa
674 # Trusted CGI Request = http://p.p/easr
675 # Trusted CGI Request = http://p.p/eass
676 # Trusted CGI Request = http://p.p/edit-actions-for-url
677 # Trusted CGI Request = http://p.p/edit-actions-list
678 # Trusted CGI Request = http://p.p/edit-actions-submit
679 # Trusted CGI Request = http://p.p/edit-actions-url
680 # Trusted CGI Request = http://p.p/edit-actions-url-form
681 # Trusted CGI Request = http://p.p/edit-actions-add-url
682 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
683 # Trusted CGI Request = http://p.p/edit-actions-remove-url
684 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
685 # Trusted CGI Request = http://p.p/edit-actions-section-add
686 # Trusted CGI Request = http://p.p/edit-actions-section-remove
687 # Trusted CGI Request = http://p.p/edit-actions-section-swap
688 # Trusted CGI Request = http://p.p/send-stylesheet
690 # The following tests depend on Privoxy being configured to deliver the user manual
692 # Fetch Test = http://p.p/user-manual
693 # Expect Status Code = 302
695 # Fetch Test = http://p.p/user-manual/
697 # Fetch Test = http://p.p/user-manual/actions-file.html
699 # Fetch Test = http://p.p/user-manual/appendix.html
701 # Fetch Test = http://p.p/user-manual/config.html
703 # Fetch Test = http://p.p/user-manual/configuration.html
705 # Fetch Test = http://p.p/user-manual/contact.html
707 # Fetch Test = http://p.p/user-manual/copyright.html
709 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
711 # Fetch Test = http://p.p/user-manual/filter-file.html
713 # Fetch Test = http://p.p/user-manual/index.html
715 # Fetch Test = http://p.p/user-manual/installation.html
717 # Fetch Test = http://p.p/user-manual/introduction.html
719 # Fetch Test = http://p.p/user-manual/p_doc.css
721 # Fetch Test = http://p.p/user-manual/proxy2.jpg
723 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
725 # Fetch Test = http://p.p/user-manual/quickstart.html
727 # Fetch Test = http://p.p/user-manual/seealso.html
729 # Fetch Test = http://p.p/user-manual/startup.html
731 # Fetch Test = http://p.p/user-manual/templates.html
733 # Fetch Test = http://p.p/user-manual/whatsnew.html
737 # Method Test = OPTIONS
744 # Method Test = DELETE
745 # Method Test = OPTIONS
746 # Method Test = TRACE
747 # Method Test = CONNECT
748 # Method Test = PROPFIND
749 # Method Test = PROPPATCH
752 # Method Test = MKCOL
754 # Method Test = UNLOCK
755 # Method Test = BCOPY
756 # Method Test = BMOVE
757 # Method Test = BDELETE
758 # Method Test = BPROPFIND
759 # Method Test = BPROPPATCH
760 # Method Test = SUBSCRIBE
761 # Method Test = UNSUBSCRIBE
762 # Method Test = NOTIFY
764 # Method Test = VERSION-CONTROL
765 # Method Test = REPORT
766 # Method Test = CHECKOUT
767 # Method Test = CHECKIN
768 # Method Test = UNCHECKOUT
769 # Method Test = MKWORKSPACE
770 # Method Test = UPDATE
771 # Method Test = LABEL
772 # Method Test = MERGE
773 # Method Test = BASELINE-CONTROL
774 # Method Test = MKACTIVITY
775 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
776 # Expect Status Code = 400
778 {+block{Forbidden Port. You are not supposed to see this.}}
779 config.privoxy.org:1-/
783 config.privoxy.org:3,79-81/
786 # 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
787 # Expect Status Code = 503
788 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
789 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/
791 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
792 # Expect Status Code = 503
793 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
794 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
796 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
797 # Expect Status Code = 503
798 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
799 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
801 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
802 # Expect Status Code = 503
803 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
804 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
806 # This one currently triggers the same error condition as the
807 # test above (socks5 server unreachable), but once Privoxy
808 # starts to properly reject invalid ports it should become useful.
810 # Fetch Test = http://invalid-forward5-gateway-port.example
811 # Expect Status Code = 503
812 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
813 invalid-forward5-gateway-port.example
815 # Fetch Test = http://forward5-null-gateway-host.example
816 # Expect Status Code = 503
817 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
818 forward5-null-gateway-host.example
820 # Fetch Test = http://www.forbidden-connect.example:444/
822 # Expect Status Code = 403
823 {+limit-connect{443}}
824 www.forbidden-connect.example/
826 # Fetch Test = http://www.blocked-request.example/blocked-request
827 # Expect Status Code = 403
828 {+block{This request failed to make it to the target destination which means the test succeeded.}}
829 www.blocked-request.example/blocked-request
831 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
832 # Expect Status Code = 403
834 www.blocked-request.example/blocked-request-with-no-reason-specified
836 # Some domain pattern tests
838 {+block{domain pattern test}}
839 # Blocked URL = http://domain-pattern-test.example/
840 # Blocked URL = http://domain-pattern-test.example.org/
841 domain-pattern-test.example.
843 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
844 # Blocked URL = http://trailing-dot.example.org./
845 # Blocked URL = http://trailing-dot.example.org./foo
846 trailing-dot.example.org
848 # Just in case there is no white-space fuzzer in the house ...
850 # Set Header = X-LWS-Test: no superfluous white space here
851 # Expect Header = NO CHANGE
852 # Set Header = X-LWS-Test: superfluous white space in the house
853 # Expect Header = X-LWS-Test: superfluous white space in the house
854 # Set Header = X-LWS-Test : superfluous white space in the house
855 # Expect Header = X-LWS-Test: superfluous white space in the house
856 # Set Header = X-LWS-Test: :superfluous white space in the house
857 # Expect Header = X-LWS-Test: :superfluous white space in the house
858 # Set Header = X-LWS-Test: :no superfluous white space here
859 # Expect Header = NO CHANGE
860 # Set Header = X-LWS-Test: superfluous white tabs in the house
861 # Expect Header = X-LWS-Test: superfluous white tabs in the house
862 # Set Header = X-LWS-Test : superfluous white tabs in the house
863 # Expect Header = X-LWS-Test: superfluous white tabs in the house
864 # Set Header = X-LWS-Test: "leave quoted lws alone"
865 # Expect Header = X-LWS-Test: "leave quoted lws alone"
866 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
867 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
868 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
869 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
870 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
871 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
872 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
873 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
877 {+fast-redirects{check-decoded-url}}
878 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
879 # Redirect Destination = http://redirected1.example.net/
880 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F¶meter=not-part-of-the-redirected-url
881 # Redirect Destination = http://redirected2.example.net/
882 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F¶meter=not-part-of-the-redirected-url
883 # Redirect Destination = http://redirected3.example.net/
884 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
885 # Redirect Destination = http://redirected4.example.net/¶meter=part-of-the-redirected-url
886 # Redirected URL = http://redirect.example.net/blafasel&url1=http%3A%2F%2Fredirected5.example.net%2F%26parameter1=part-of-the-redirected-url&url2=http%3A%2F%2Fredirected5.example.net%2F%26parameter2=part-of-the-redirected-url2
887 # Redirect Destination = http://redirected5.example.net/¶meter2=part-of-the-redirected-url2
888 # Redirected URL = http://redirect.example.net/blafasel&url1=http%3A%2F%2Fredirected6.example.net%2F%26parameter1=part-of-the-redirected-url&url2=http%3A%2F%2Fredirected6.example.net%2F%26parameter2=part-of-the-redirected-url2¶meter3=not-part-of-the-redirected-url2
889 # Redirect Destination = http://redirected6.example.net/¶meter2=part-of-the-redirected-url2
890 # Redirected URL = http://redirect.example.net/blafasel?x=http%3A%2F%2Fredirected7.example.net%2F%26parameter1=part-of-the-redirected-url1¶meter2=not-part-of-the-redirected-url1
891 # Redirect Destination = http://redirected7.example.net/¶meter1=part-of-the-redirected-url1
892 # Redirected URL = http://redirect.example.net/blafasel?x=http%3A%2F%2Fredirected8.example.net%2F%26parameter1=part-of-the-redirected-url1¶meter2=not-part-of-the-redirected-url1¶meter3=not-part-of-the-redirected-url1
893 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
894 # Redirected URL = http://redirect.example.net/blafasel?a?b?c?d?e?f?g?h?i?j?k?l?m?n?o?p?q?r?s&t&u&v&w&x&y&z&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16x=http%3A%2F%2Fredirected8.example.net%2F%26parameter1=part-of-the-redirected-url1¶meter2=not-part-of-the-redirected-url1¶meter3=not-part-of-the-redirected-url1
895 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
896 # Redirected URL = http://redirect.example.net/blafasel???????????????????????????????=http%3A%2F%2Fredirected8.example.net%2F%26parameter1=part-of-the-redirected-url1¶meter2=not-part-of-the-redirected-url1¶meter3=not-part-of-the-redirected-url1
897 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
898 # Redirected URL = http://redirect.example.net/blafasel&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&=http%3A%2F%2Fredirected8.example.net%2F%26parameter1=part-of-the-redirected-url1¶meter2=not-part-of-the-redirected-url1¶meter3=not-part-of-the-redirected-url1
899 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
900 redirect.example.net/
901 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
902 # Redirect Destination = http://redirect2.example.net/
903 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
904 # Redirect Destination = http://redirect2.example.net/
905 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
906 # Redirect Destination = http://redirect2.example.net/
907 # These tests verify that Privoxy behaves as intended,
908 # given that the encoded redirect URLs are invalid,
909 # there are no correct redirect URLs.
910 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
911 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
912 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
913 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
915 {+fast-redirects{simple-check}}
916 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
917 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
918 redirect2.example.net/