1 #############################################################################
2 # $Id: regression-tests.action,v 1.45 2012/04/22 12:14:46 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
263 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
264 # Expect Header = SOME CHANGE
265 # Set Header = If-Modified-Since: Thu, 04-Oct-07 09:56:35 GMT
266 # Expect Header = SOME CHANGE
267 # Set Header = If-Modified-Since: Thursday, 04-Oct-2007 09:56:35 GMT
268 # Expect Header = SOME CHANGE
269 # Set Header = If-Modified-Since: Thu, 04-Oct-2007 09:56:35 GMT
270 # Expect Header = SOME CHANGE
271 # Set Header = If-Modified-Since: Thursday Oct 04 09:56:35 2007 GMT
272 # Expect Header = SOME CHANGE
274 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
275 # Expect Header = SOME CHANGE
277 # Set Header = If-Modified-Since: Thu, 01-Jan-70 00:00:00 GMT
278 # Expect Header = SOME CHANGE
280 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 00:00:00 GMT
281 # Expect Header = SOME CHANGE
283 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 00:00:00 GMT
284 # Expect Header = SOME CHANGE
286 # Set Header = If-Modified-Since: Thursday Jan 01 00:00:00 1970 GMT
287 # Expect Header = SOME CHANGE
290 # Set Header = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
291 # Expect Header = REMOVAL
292 # Set Header = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
293 # Expect Header = REMOVAL
294 # Set Header = If-Modified-Since: Thursday, 01-Jan-123456789 00:00:00 GMT
295 # Expect Header = REMOVAL
296 # Set Header = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
297 # Expect Header = REMOVAL
298 # Set Header = If-Modified-Since: Thursday Jan 01 00:00:00 123456789 GMT
299 # Expect Header = REMOVAL
301 # Set Header = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
302 # Expect Header = SOME CHANGE
304 # Set Header = If-Modified-Since: Mon, 01-Jan-25 00:00:00 GMT
305 # Expect Header = SOME CHANGE
307 # Set Header = If-Modified-Since: Monday, 01-Jan-2525 00:00:00 GMT
308 # Expect Header = SOME CHANGE
310 # Set Header = If-Modified-Since: Mon, 01-Jan-2525 00:00:00 GMT
311 # Expect Header = SOME CHANGE
313 # Set Header = If-Modified-Since: Monday Jan 01 00:00:00 2525 GMT
314 # Expect Header = SOME CHANGE
317 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
318 # Expect Header = SOME CHANGE
319 # Set Header = If-Modified-Since: Thu, 01-Jan-70 02:00:00 GMT
320 # Expect Header = SOME CHANGE
321 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 02:00:00 GMT
322 # Expect Header = SOME CHANGE
323 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 02:00:00 GMT
324 # Expect Header = SOME CHANGE
325 # Set Header = If-Modified-Since: Thursday Jan 01 02:00:00 1970 GMT
326 # Expect Header = SOME CHANGE
328 {+hide-if-modified-since{-60} -crunch-if-none-match}
329 TAG:^hide-if-modified-since\{-60\}$
331 # Set Header = If-Modified-Since: Gee, this date is invalid
332 # Expect Header = REMOVAL
333 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
334 # Expect Header = SOME CHANGE
335 # Set Header = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
336 # Expect Header = SOME CHANGE
338 {+hide-if-modified-since{+60} -crunch-if-none-match}
339 TAG:^hide-if-modified-since\{\+60\}$
341 # Set Header = If-Modified-Since: Gee, this date is invalid
342 # Expect Header = REMOVAL
343 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
344 # Expect Header = SOME CHANGE
346 {+hide-if-modified-since{60} -crunch-if-none-match}
347 TAG:^hide-if-modified-since\{60\}$
349 # Set Header = If-Modified-Since: Gee, this date is invalid
350 # Expect Header = REMOVAL
351 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
352 # Expect Header = NO CHANGE
354 {+hide-if-modified-since{+0} -crunch-if-none-match}
355 TAG:^hide-if-modified-since\{\+0\}$
357 # Set Header = If-Modified-Since: Gee, this date is invalid
358 # Expect Header = REMOVAL
359 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
360 # Expect Header = NO CHANGE
362 {+hide-if-modified-since{-0} -crunch-if-none-match}
363 TAG:^hide-if-modified-since\{-0\}$
365 # Set Header = If-Modified-Since: Gee, this date is invalid
366 # Expect Header = REMOVAL
367 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
368 # Expect Header = NO CHANGE
370 {+hide-if-modified-since{0} -crunch-if-none-match}
371 TAG:^hide-if-modified-since\{0\}$
373 # Set Header = If-Modified-Since: Gee, this date is invalid
374 # Expect Header = REMOVAL
375 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
376 # Expect Header = NO CHANGE
378 {+hide-if-modified-since{NaN} -crunch-if-none-match}
379 TAG:^hide-if-modified-since\{NaN\}$
382 #######################################################
383 # Test crunch-outgoing-cookies
384 #######################################################
386 # Set Header = If-Modified-Since: Gee, this date is invalid
387 # Expect Header = NO CHANGE
389 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
390 # Expect Header = REMOVAL
392 +crunch-outgoing-cookies \
393 -crunch-incoming-cookies \
394 -session-cookies-only \
395 -hide-if-modified-since \
397 TAG:^crunch-outgoing-cookies$
399 #######################################################
400 # Test session-cookies-only
402 # XXX: pretty useless as session-cookies-only doesn't
403 # affect client headers.
404 #######################################################
406 # Set Header = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
407 # Expect Header = NO CHANGE
409 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
410 # Expect Header = NO CHANGE
412 -crunch-outgoing-cookies \
413 -crunch-incoming-cookies \
414 +session-cookies-only \
415 -hide-if-modified-since \
417 TAG:^session-cookies-only$
419 #######################################################
420 # Test change-x-forwarded-for
421 #######################################################
423 # Set Header = X-Forwarded-For: 10.0.0.1
424 # Expect Header = NO CHANGE
426 -change-x-forwarded-for \
428 TAG:^-change-x-forwarded-for$
430 # Set Header = X-Forwarded-For: 10.0.0.1
431 # Expect Header = REMOVAL
433 +change-x-forwarded-for{block} \
435 TAG:^change-x-forwarded-for\{block\}$
437 # Set Header = X-Forwarded-For: 10.0.0.1
438 # Expect Header = SOME CHANGE
440 +change-x-forwarded-for{add} \
442 TAG:^change-x-forwarded-for\{add\}$
444 #######################################################
445 # Test hide-from-header
446 #######################################################
448 # Set Header = From: schneewitchen@example.org
449 # Expect Header = REMOVAL
451 +hide-from-header{block}\
453 TAG:^hide-from-header\{block\}$
455 # Set Header = From: schneewitchen@example.org
456 # Expect Header = From: siebenzwerge@example.org
458 +hide-from-header{siebenzwerge@example.org}\
460 TAG:^hide-from-header\{siebenzwerge@example.org\}$
462 #######################################################
463 # Test prevent-compression
464 #######################################################
466 # Set Header = Accept-Encoding: gzip, deflate
467 # Expect Header = REMOVAL
469 # Set Header = Accept-Encoding: gzip
470 # Expect Header = REMOVAL
472 # Set Header = Accept-Encoding: deflate
473 # Expect Header = REMOVAL
475 +prevent-compression\
477 TAG:^prevent-compression$
479 #######################################################
480 # Test content filters which could cause problems with
482 #######################################################
484 # Set Header = Range: bytes=1234-5678
485 # Expect Header = REMOVAL
486 # Set Header = Range: bytes=1-5
487 # Expect Header = REMOVAL
488 # Set Header = If-Range: bytes=1234-5678
489 # Expect Header = REMOVAL
490 # Set Header = Request-Range: bytes=1234-5678
491 # Expect Header = REMOVAL
492 # Set Header = Range: foo
493 # Expect Header = REMOVAL
494 # Set Header = If-Range: foo
495 # Expect Header = REMOVAL
496 # Set Header = Request-Range: foo
497 # Expect Header = REMOVAL
498 # Set Header = Range: bytes=0-5678
499 # Expect Header = NO CHANGE
500 # Set Header = Range: bytes=0-
501 # Expect Header = NO CHANGE
502 # Set Header = If-Range: bytes=0-5678
503 # Expect Header = NO CHANGE
504 # Set Header = If-Range: bytes=0-
505 # Expect Header = NO CHANGE
506 # Set Header = Request-Range: bytes=0-5678
507 # Expect Header = NO CHANGE
508 # Set Header = Request-Range: bytes=0-
509 # Expect Header = NO CHANGE
511 -client-header-tagger{range-requests} \
512 +deanimate-gifs{last} \
515 TAG:^deanimate-gifs\{last\}$
517 # Set Header = Range: bytes=1234-5678
518 # Expect Header = REMOVAL
519 # Set Header = Range: bytes=1-5
520 # Expect Header = REMOVAL
521 # Set Header = If-Range: bytes=1234-5678
522 # Expect Header = REMOVAL
523 # Set Header = Request-Range: bytes=1234-5678
524 # Expect Header = REMOVAL
525 # Set Header = Range: bytes=1-5
526 # Expect Header = REMOVAL
527 # Set Header = If-Range: bytes=1234-5678
528 # Expect Header = REMOVAL
529 # Set Header = Request-Range: bytes=1234-5678
530 # Expect Header = REMOVAL
531 # Set Header = Range: foo
532 # Expect Header = REMOVAL
533 # Set Header = If-Range: foo
534 # Expect Header = REMOVAL
535 # Set Header = Request-Range: foo
536 # Expect Header = REMOVAL
537 # Set Header = Range: bytes=0-5678
538 # Expect Header = NO CHANGE
539 # Set Header = Range: bytes=0-
540 # Expect Header = NO CHANGE
541 # Set Header = If-Range: bytes=0-5678
542 # Expect Header = NO CHANGE
543 # Set Header = If-Range: bytes=0-
544 # Expect Header = NO CHANGE
545 # Set Header = Request-Range: bytes=0-5678
546 # Expect Header = NO CHANGE
547 # Set Header = Request-Range: bytes=0-
548 # Expect Header = NO CHANGE
550 -client-header-tagger{range-requests} \
552 +filter{banners-by-size} \
554 TAG:^filter\{banners-by-size\}$
556 # Set Header = Range: bytes=1234-5678
557 # Expect Header = NO CHANGE
558 # Set Header = If-Range: bytes=1234-5678
559 # Expect Header = NO CHANGE
560 # Set Header = Request-Range: bytes=1234-5678
561 # Expect Header = NO CHANGE
563 -client-header-tagger{range-requests} \
567 TAG:^no-content-filter$
569 # Set Header = Connection: keep-alive
570 # Expect Header = NO CHANGE
572 # Set Header = Connection:
573 # Expect Header = REMOVAL
576 TAG:^Connection: keep-alive$
578 # Set Header = Connection: keep-alive
579 # Expect Header = Connection: close
581 # Set Header = Connection:
582 # Expect Header = Connection: close
585 TAG:^Connection: close$
587 # Set Header = Connection: close
588 # Expect Header = NO CHANGE
591 TAG:^connection-sharing disabled$
593 # Set Header = Connection: close
594 # Expect Header = REMOVAL
596 # Set Header = Connection: keep-alive
597 # Expect Header = NO CHANGE
600 TAG:^connection-sharing enabled$
602 # XXX: Removing a header by not specifying a value is
603 # an inherited curl feature and could be viewed as a
604 # bug as far as Privoxy-Regression-Test is concerned.
607 # Expect Header = Host: p.p
611 # Set Header = Host: whatever.example.org
612 # Expect Header = NO CHANGE
614 TAG:^Host header other than the target host$
616 # Set Header = Keep-Alive: 20
617 # Expect Header = NO CHANGE
620 TAG:^Pass Keep-Alive header$
622 # Set Header = Keep-Alive: 20
623 # Expect Header = REMOVAL
626 TAG:^Keep-Alive header removal$
628 # XXX: check the RFC to use a real value
629 # Set Header = proxy-connection: keep-alive
630 # Expect Header = REMOVAL
632 TAG:^Proxy-Connection removal$
634 # Set Header = Proxy-Connection: keep-alive
635 # Expect Header = REMOVAL
637 TAG:^Proxy-Connection removal$
639 # These are somewhat redundant when testing with
640 # GET requests, but I want to remember then when
641 # TRACE requests are supported.
643 # Set Header = Max-Forwards: 0
644 # Expect Header = NO CHANGE
645 # Set Header = Max-Forwards: 1
646 # Expect Header = NO CHANGE
647 # Set Header = Max-Forwards: -1
648 # Expect Header = NO CHANGE
649 # Set Header = Max-Forwards: 3
650 # Expect Header = NO CHANGE
652 TAG:^Max-Forwards header without TRACE method$
654 ################################################################
656 # Fairly dumb tests for Privoxy CGI pages.
658 # These are mainly useful for checking for memory leaks
659 # with Valgrind or whether or not the user manual is installed
660 # correctly and are unlikely to actually detect any
662 # Note that if "Expect Status Code" is missing, 200 is implied.
664 ################################################################
666 # Fetch Test = http://p.p/
667 # Fetch Test = http://p.p/die
668 # Expect Status Code = 404
670 # Fetch Test = http://p.p/die
671 # Expect Status Code = 200
673 # Fetch Test = http://p.p/show-status
674 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
675 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
676 # XXX: for the invalid ones we probably shouldn't return status code 200.
677 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
678 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
679 # Fetch Test = http://config.privoxy.org/show-status?file=actions
680 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
681 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
682 # Fetch Test = http://config.privoxy.org/show-status?file=filter
683 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
684 # Fetch Test = http://config.privoxy.org/show-status?file=trust
685 # Fetch Test = http://p.p/show-version
686 # Fetch Test = http://p.p/show-request
687 # Fetch Test = http://p.p/show-url-info
688 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
689 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
690 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
691 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
692 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
693 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
694 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
695 # Fetch Test = http://p.p/show-url-info?url=
696 # Fetch Test = http://p.p/show-url-info?url=%2F
697 # Depends on FEATURE_TOGGLE
698 # Fetch Test = http://p.p/toggle
700 # Fetch Test = http://p.p/toggle
701 # Expect Status Code = 404
703 # Fetch Test = http://p.p/edit-actions
704 # Fetch Test = http://p.p/eaa
705 # Fetch Test = http://p.p/eau
706 # Fetch Test = http://p.p/ear
707 # Fetch Test = http://p.p/eal
708 # Fetch Test = http://p.p/eafu
709 # Fetch Test = http://p.p/eas
710 # Fetch Test = http://p.p/easa
711 # Fetch Test = http://p.p/easr
712 # Fetch Test = http://p.p/eass
713 # Fetch Test = http://p.p/edit-actions-for-url
714 # Fetch Test = http://p.p/edit-actions-list
715 # Fetch Test = http://p.p/edit-actions-submit
716 # Fetch Test = http://p.p/edit-actions-url
717 # Fetch Test = http://p.p/edit-actions-url-form
718 # Fetch Test = http://p.p/edit-actions-add-url
719 # Fetch Test = http://p.p/edit-actions-add-url-form
720 # Fetch Test = http://p.p/edit-actions-remove-url
721 # Fetch Test = http://p.p/edit-actions-remove-url-form
722 # Fetch Test = http://p.p/edit-actions-section-add
723 # Fetch Test = http://p.p/edit-actions-section-remove
724 # Fetch Test = http://p.p/edit-actions-section-swap
725 # Fetch Test = http://p.p/error-favicon.ico
726 # Fetch Test = http://p.p/favicon.ico
727 # Fetch Test = http://p.p/robots.txt
728 # Fetch Test = http://p.p/send-banner
729 # Fetch Test = http://p.p/send-stylesheet
730 # Fetch Test = http://p.p/t
731 # Fetch Test = http://p.p/url-info-osd.xml
733 # Trusted CGI Request = http://p.p/edit-actions
734 # Expect Status Code = 302
735 # Level = 12 # Depends on the CGI editor being enabled
736 # Fetch Test = http://p.p/does-not-exist
737 # Expect Status Code = 404
738 # Trusted CGI Request = http://p.p/eaa
739 # Trusted CGI Request = http://p.p/eau
740 # Trusted CGI Request = http://p.p/ear
741 # Trusted CGI Request = http://p.p/eal
742 # Trusted CGI Request = http://p.p/eafu
743 # Trusted CGI Request = http://p.p/eas
744 # Trusted CGI Request = http://p.p/easa
745 # Trusted CGI Request = http://p.p/easr
746 # Trusted CGI Request = http://p.p/eass
747 # Trusted CGI Request = http://p.p/edit-actions-for-url
748 # Trusted CGI Request = http://p.p/edit-actions-list
749 # Trusted CGI Request = http://p.p/edit-actions-submit
750 # Trusted CGI Request = http://p.p/edit-actions-url
751 # Trusted CGI Request = http://p.p/edit-actions-url-form
752 # Trusted CGI Request = http://p.p/edit-actions-add-url
753 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
754 # Trusted CGI Request = http://p.p/edit-actions-remove-url
755 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
756 # Trusted CGI Request = http://p.p/edit-actions-section-add
757 # Trusted CGI Request = http://p.p/edit-actions-section-remove
758 # Trusted CGI Request = http://p.p/edit-actions-section-swap
759 # Trusted CGI Request = http://p.p/send-stylesheet
761 # The following tests depend on Privoxy being configured to deliver the user manual
763 # Fetch Test = http://p.p/user-manual
764 # Expect Status Code = 302
766 # Fetch Test = http://p.p/user-manual/
768 # Fetch Test = http://p.p/user-manual/actions-file.html
770 # Fetch Test = http://p.p/user-manual/appendix.html
772 # Fetch Test = http://p.p/user-manual/config.html
774 # Fetch Test = http://p.p/user-manual/configuration.html
776 # Fetch Test = http://p.p/user-manual/contact.html
778 # Fetch Test = http://p.p/user-manual/copyright.html
780 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
782 # Fetch Test = http://p.p/user-manual/filter-file.html
784 # Fetch Test = http://p.p/user-manual/index.html
786 # Fetch Test = http://p.p/user-manual/installation.html
788 # Fetch Test = http://p.p/user-manual/introduction.html
790 # Fetch Test = http://p.p/user-manual/p_doc.css
792 # Fetch Test = http://p.p/user-manual/proxy2.jpg
794 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
796 # Fetch Test = http://p.p/user-manual/quickstart.html
798 # Fetch Test = http://p.p/user-manual/seealso.html
800 # Fetch Test = http://p.p/user-manual/startup.html
802 # Fetch Test = http://p.p/user-manual/templates.html
804 # Fetch Test = http://p.p/user-manual/whatsnew.html
808 # Method Test = OPTIONS
815 # Method Test = DELETE
816 # Method Test = OPTIONS
817 # Method Test = TRACE
818 # Method Test = CONNECT
819 # Method Test = PROPFIND
820 # Method Test = PROPPATCH
823 # Method Test = MKCOL
825 # Method Test = UNLOCK
826 # Method Test = BCOPY
827 # Method Test = BMOVE
828 # Method Test = BDELETE
829 # Method Test = BPROPFIND
830 # Method Test = BPROPPATCH
831 # Method Test = SUBSCRIBE
832 # Method Test = UNSUBSCRIBE
833 # Method Test = NOTIFY
835 # Method Test = VERSION-CONTROL
836 # Method Test = REPORT
837 # Method Test = CHECKOUT
838 # Method Test = CHECKIN
839 # Method Test = UNCHECKOUT
840 # Method Test = MKWORKSPACE
841 # Method Test = UPDATE
842 # Method Test = LABEL
843 # Method Test = MERGE
844 # Method Test = BASELINE-CONTROL
845 # Method Test = MKACTIVITY
846 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
847 # Expect Status Code = 400
849 {+block{Forbidden Port. You are not supposed to see this.}}
850 config.privoxy.org:1-/
854 config.privoxy.org:3,79-81/
857 # 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
858 # Expect Status Code = 503
859 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
860 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/
862 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
863 # Expect Status Code = 503
864 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
865 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
867 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
868 # Expect Status Code = 503
869 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
870 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
872 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
873 # Expect Status Code = 503
874 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
875 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
877 # This one currently triggers the same error condition as the
878 # test above (socks5 server unreachable), but once Privoxy
879 # starts to properly reject invalid ports it should become useful.
881 # Fetch Test = http://invalid-forward5-gateway-port.example
882 # Expect Status Code = 503
883 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
884 invalid-forward5-gateway-port.example
886 # Fetch Test = http://forward5-null-gateway-host.example
887 # Expect Status Code = 503
888 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
889 forward5-null-gateway-host.example
891 # Fetch Test = http://www.forbidden-connect.example:444/
893 # Expect Status Code = 403
894 {+limit-connect{443}}
895 www.forbidden-connect.example/
897 # Fetch Test = http://www.blocked-request.example/blocked-request
898 # Expect Status Code = 403
899 {+block{This request failed to make it to the target destination which means the test succeeded.}}
900 www.blocked-request.example/blocked-request
902 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
903 # Expect Status Code = 403
905 www.blocked-request.example/blocked-request-with-no-reason-specified
907 # Some domain pattern tests
909 {+block{domain pattern test}}
910 # Blocked URL = http://domain-pattern-test.example/
911 # Blocked URL = http://domain-pattern-test.example.org/
912 domain-pattern-test.example.
914 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
915 # Blocked URL = http://trailing-dot.example.org./
916 # Blocked URL = http://trailing-dot.example.org./foo
917 trailing-dot.example.org
919 # Just in case there is no white-space fuzzer in the house ...
921 # Set Header = X-LWS-Test: no superfluous white space here
922 # Expect Header = NO CHANGE
923 # Set Header = X-LWS-Test: superfluous white space in the house
924 # Expect Header = X-LWS-Test: superfluous white space in the house
925 # Set Header = X-LWS-Test : superfluous white space in the house
926 # Expect Header = X-LWS-Test: superfluous white space in the house
927 # Set Header = X-LWS-Test: :superfluous white space in the house
928 # Expect Header = X-LWS-Test: :superfluous white space in the house
929 # Set Header = X-LWS-Test: :no superfluous white space here
930 # Expect Header = NO CHANGE
931 # Set Header = X-LWS-Test: superfluous white tabs in the house
932 # Expect Header = X-LWS-Test: superfluous white tabs in the house
933 # Set Header = X-LWS-Test : superfluous white tabs in the house
934 # Expect Header = X-LWS-Test: superfluous white tabs in the house
935 # Set Header = X-LWS-Test: "leave quoted lws alone"
936 # Expect Header = X-LWS-Test: "leave quoted lws alone"
937 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
938 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
939 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
940 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
941 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
942 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
943 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
944 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
948 {+fast-redirects{check-decoded-url}}
949 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
950 # Redirect Destination = http://redirected1.example.net/
951 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F¶meter=not-part-of-the-redirected-url
952 # Redirect Destination = http://redirected2.example.net/
953 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F¶meter=not-part-of-the-redirected-url
954 # Redirect Destination = http://redirected3.example.net/
955 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
956 # Redirect Destination = http://redirected4.example.net/¶meter=part-of-the-redirected-url
957 # 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
958 # Redirect Destination = http://redirected5.example.net/¶meter2=part-of-the-redirected-url2
959 # 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
960 # Redirect Destination = http://redirected6.example.net/¶meter2=part-of-the-redirected-url2
961 # 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
962 # Redirect Destination = http://redirected7.example.net/¶meter1=part-of-the-redirected-url1
963 # 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
964 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
965 # 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
966 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
967 # 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
968 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
969 # 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
970 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
971 redirect.example.net/
972 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
973 # Redirect Destination = http://redirect2.example.net/
974 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
975 # Redirect Destination = http://redirect2.example.net/
976 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
977 # Redirect Destination = http://redirect2.example.net/
978 # These tests verify that Privoxy behaves as intended,
979 # given that the encoded redirect URLs are invalid,
980 # there are no correct redirect URLs.
981 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
982 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
983 # 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%%
984 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
986 {+fast-redirects{simple-check}}
987 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
988 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
989 redirect2.example.net/