1 #############################################################################
3 # This is a configuration file for Privoxy-Regression-Test
4 # (included in the source tarball's tools directory).
6 # After referencing it in your Privoxy configuration both Privoxy and
7 # Privoxy-Regression-Test should be good to go.
9 #############################################################################
11 # Copyright (c) 2007-2018 Fabian Keil <fk@fabiankeil.de>
13 # Permission to use, copy, modify, and distribute this software for any
14 # purpose with or without fee is hereby granted, provided that the above
15 # copyright notice and this permission notice appear in all copies.
17 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
18 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
19 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
20 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
22 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
23 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 #############################################################################
28 for-privoxy-version=3.0.27
30 # Some dependencies Privoxy-Regression-Test should know about:
32 # Level 9 needs = config line user-manual\s+(\.?\.?/|[A-Za-z]:)
33 # Level 12 needs = feature status FEATURE_CGI_EDIT_ACTIONS Yes
34 # Level 12 needs = config line enable-edit-actions\s+1
35 # Level 13 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
36 # Level 13 needs = config line keep-alive-timeout\s+(2[1-9]+|[3-9]\d+|1\d{2,})
37 # Level 14 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE No
38 # Level 15 needs = config line connection-sharing\s+0
39 # Level 16 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
40 # Level 16 needs = config line connection-sharing\s+1
41 # Level 17 needs = feature status FEATURE_64_BIT_TIME_T Yes
42 # Level 18 needs = feature status FEATURE_GRACEFUL_TERMINATION No
43 # Level 19 needs = feature status FEATURE_GRACEFUL_TERMINATION Yes
44 # Level 20 needs = config line enable-remote-toggle\s+1
45 # Level 21 needs = config line enable-remote-toggle\s+0
46 # Level 22 needs = config line enable-proxy-authentication-forwarding\s+0
47 # Level 23 needs = config line enable-proxy-authentication-forwarding\s+1
48 # Level 24 needs = feature status FEATURE_CLIENT_TAGS Yes
49 # Level 25 needs = feature status FEATURE_HTTPS_INSPECTION No
51 #######################################################
52 # Enable taggers to activate the tests on demand
53 # and suppress hiding the User-Agent for
54 # Privoxy-Regression-Test to save log space.
55 #######################################################
57 +client-header-tagger{user-agent} \
58 +client-header-tagger{privoxy-control} \
59 +client-header-filter{privoxy-control} \
66 TAG:^User-Agent: Privoxy-Regression-Test
68 #######################################################
69 # Test accept-language{}.
70 #######################################################
72 {+hide-accept-language{en-gb}}
73 # Set Header = Accept-Language: de-de
74 # Expect Header = Accept-Language: en-gb
75 TAG:^hide-accept-language\{en-gb\}$
77 {+hide-accept-language{block}}
78 # Set Header = Accept-Language: de-de
79 # Expect Header = REMOVAL
80 TAG:^hide-accept-language\{block\}$
82 #######################################################
83 # Sections for hide-referrer{} to test:
85 # 1) conditional-block
86 # 2) conditional-forge
89 # 5) a parameter that looks like a valid fake referrer
90 # 6) a parameter that looks like an invalid fake referrer
91 #######################################################
93 {+hide-referrer{conditional-block}}
94 # Set Header = Referer: http://www.example.org/foo
95 # Expect Header = REMOVAL
97 # Set Header = Referer: http://p.p/foo
98 # Expect Header = NO CHANGE
100 # Set Header = Referer: p.p/
101 # Expect Header = REMOVAL
103 # Set Header = Referer: p
104 # Expect Header = REMOVAL
106 # Set Header = Referer: http://
107 # Expect Header = REMOVAL
109 # Set Header = Referer: https://p.p/
110 # Expect Header = REMOVAL
111 TAG:^hide-referrer\{conditional-block\}$
113 {+hide-referrer{conditional-forge}}
114 # Set Header = Referer: http://www.example.org/foo
115 # Expect Header = Referer: http://p.p/
117 # Set Header = Referer: http://p.p/foo
118 # Expect Header = NO CHANGE
120 # Set Header = Referer: p.p/
121 # Expect Header = Referer: http://p.p/
123 # Set Header = Referer: p
124 # Expect Header = Referer: http://p.p/
126 # Set Header = Referer: http://
127 # Expect Header = Referer: http://p.p/
129 # Set Header = Referer: https://p.p/
130 # Expect Header = Referer: http://p.p/
131 TAG:^hide-referrer\{conditional-forge\}$
133 {+hide-referrer{forge}}
134 # Set Header = Referer: http://www.example.org/foo
135 # Expect Header = Referer: http://p.p/
136 TAG:^hide-referrer\{forge\}$
138 {+hide-referrer{block}}
139 # Set Header = Referer: http://www.example.org/foo
140 # Expect Header = REMOVAL
141 TAG:^hide-referrer\{block\}$
143 {+hide-referrer{invalid}}
144 # Set Header = Referer: http://www.example.org/foo
145 # Expect Header = Referer: invalid
146 TAG:^hide-referrer\{invalid\}$
148 {+hide-referrer{http://www.privoxy.org/}}
149 # Set Header = Referer: http://www.example.org/asdf
150 # Expect Header = Referer: http://www.privoxy.org/
151 TAG:^hide-referrer\{http://www.privoxy.org/\}$
154 #TAG:^hide-referrer\{\}$
156 #######################################################
157 # Test hide-user-agent{}.
158 #######################################################
160 {+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD alpha; en-GB; rv:1.8.1.6) Gecko/20070913 Firefox/2.0.0.6}}
161 # 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
162 # 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
163 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\}$
165 {+hide-user-agent{block}}
166 # XXX: Check the code that is tested here.
167 # Set Header = ua-blah: blah
168 # Expect Header = REMOVAL
169 TAG:^hide-user-agent{block}$
172 # Set Header = ua-blah: blah
173 # Expect Header = NO CHANGE
174 TAG:^-hide-user-agent{block}$
177 #######################################################
179 #######################################################
181 {+add-header{X-Custom-Header: yes, please}}
182 # Set Header = X-Whatever: foo
183 # Expect 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 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
191 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/
192 # Expect Header = Referer: http://p.p/
194 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
195 # Expect Header = Referer: http://p.p/foo/bar/baaz/
197 # Set Header = Referer: http://p.p/
198 # Expect Header = NO CHANGE
200 # Set Header = Referer: http://config.privoxy.org.zwiebelsuppe.exit/foo/bar/baaz.html
201 # Expect Header = Referer: http://config.privoxy.org/foo/bar/baaz.html
203 # Set Header = Host: p.p.zwiebelsuppe.exit
204 # Expect Header = Host: p.p
206 # Set Header = Host: p.p
207 # Expect Header = NO CHANGE
209 # Set Header = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
210 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
211 TAG:^client-header-filter\{hide-tor-exit-notation\}$
213 #######################################################
214 # Test crunch-client-header{}.
215 #######################################################
217 {+crunch-client-header{text/html}}
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
226 TAG:^crunch-client-header\{text/plain\}$
228 #######################################################
229 # Test crunch-if-none-match.
230 #######################################################
232 {+crunch-if-none-match -hide-if-modified-since}
233 # Set Header = If-None-Match: 8987afd239d2093kd2309kd
234 # Expect Header = REMOVAL
236 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
237 # Expect Header = REMOVAL
239 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
240 # Expect Header = NO CHANGE
241 TAG:^crunch-if-none-match$
243 #######################################################
244 # Test hide-if-modified-since
245 #######################################################
247 {+hide-if-modified-since{block} -crunch-if-none-match}
248 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
249 # Expect Header = REMOVAL
251 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
252 # Expect Header = NO CHANGE
253 TAG:^hide-if-modified-since\{block\}$
255 {+hide-if-modified-since{-60} -crunch-if-none-match}
256 # Set Header = If-Modified-Since: Gee, this date is invalid
257 # Expect Header = REMOVAL
259 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
260 # Expect Header = SOME CHANGE
261 # Set Header = If-Modified-Since: Thu, 04-Oct-07 09:56:35 GMT
262 # Expect Header = SOME CHANGE
263 # Set Header = If-Modified-Since: Thursday, 04-Oct-2007 09:56:35 GMT
264 # Expect Header = SOME CHANGE
265 # Set Header = If-Modified-Since: Thu, 04-Oct-2007 09:56:35 GMT
266 # Expect Header = SOME CHANGE
267 # Set Header = If-Modified-Since: Thursday Oct 04 09:56:35 2007 GMT
268 # Expect Header = SOME CHANGE
270 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
271 # Expect Header = SOME CHANGE
273 # Set Header = If-Modified-Since: Thu, 01-Jan-70 00:00:00 GMT
274 # Expect Header = SOME CHANGE
276 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 00:00:00 GMT
277 # Expect Header = SOME CHANGE
279 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 00:00:00 GMT
280 # Expect Header = SOME CHANGE
282 # Set Header = If-Modified-Since: Thursday Jan 01 00:00:00 1970 GMT
283 # Expect Header = SOME CHANGE
286 # Set Header = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
287 # Expect Header = REMOVAL
288 # Set Header = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
289 # Expect Header = REMOVAL
290 # Set Header = If-Modified-Since: Thursday, 01-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 Jan 01 00:00:00 123456789 GMT
295 # Expect Header = REMOVAL
297 # Set Header = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
298 # Expect Header = SOME CHANGE
300 # Set Header = If-Modified-Since: Mon, 01-Jan-25 00:00:00 GMT
301 # Expect Header = SOME CHANGE
303 # Set Header = If-Modified-Since: Monday, 01-Jan-2525 00:00:00 GMT
304 # Expect Header = SOME CHANGE
306 # Set Header = If-Modified-Since: Mon, 01-Jan-2525 00:00:00 GMT
307 # Expect Header = SOME CHANGE
309 # Set Header = If-Modified-Since: Monday Jan 01 00:00:00 2525 GMT
310 # Expect Header = SOME CHANGE
313 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
314 # Expect Header = SOME CHANGE
315 # Set Header = If-Modified-Since: Thu, 01-Jan-70 02:00:00 GMT
316 # Expect Header = SOME CHANGE
317 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 02:00:00 GMT
318 # Expect Header = SOME CHANGE
319 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 02:00:00 GMT
320 # Expect Header = SOME CHANGE
321 # Set Header = If-Modified-Since: Thursday Jan 01 02:00:00 1970 GMT
322 # Expect Header = SOME CHANGE
323 TAG:^hide-if-modified-since\{-60\}$
325 {+hide-if-modified-since{+60} -crunch-if-none-match}
326 # Set Header = If-Modified-Since: Gee, this date is invalid
327 # Expect Header = REMOVAL
328 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
329 # Expect Header = SOME CHANGE
330 # Set Header = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
331 # Expect Header = SOME CHANGE
333 TAG:^hide-if-modified-since\{\+60\}$
335 {+hide-if-modified-since{60} -crunch-if-none-match}
336 # Set Header = If-Modified-Since: Gee, this date is invalid
337 # Expect Header = REMOVAL
338 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
339 # Expect Header = SOME CHANGE
340 TAG:^hide-if-modified-since\{60\}$
342 {+hide-if-modified-since{+0} -crunch-if-none-match}
343 # Set Header = If-Modified-Since: Gee, this date is invalid
344 # Expect Header = REMOVAL
345 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
346 # Expect Header = NO CHANGE
347 TAG:^hide-if-modified-since\{\+0\}$
349 {+hide-if-modified-since{-0} -crunch-if-none-match}
350 # Set Header = If-Modified-Since: Gee, this date is invalid
351 # Expect Header = REMOVAL
352 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
353 # Expect Header = NO CHANGE
354 TAG:^hide-if-modified-since\{-0\}$
356 {+hide-if-modified-since{0} -crunch-if-none-match}
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
361 TAG:^hide-if-modified-since\{0\}$
363 {+hide-if-modified-since{NaN} -crunch-if-none-match}
364 # Set Header = If-Modified-Since: Gee, this date is invalid
365 # Expect Header = REMOVAL
366 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
367 # Expect Header = NO CHANGE
368 TAG:^hide-if-modified-since\{NaN\}$
371 #######################################################
372 # Test crunch-outgoing-cookies
373 #######################################################
376 +crunch-outgoing-cookies \
377 -crunch-incoming-cookies \
378 -limit-cookie-lifetime \
379 -session-cookies-only \
380 -hide-if-modified-since \
382 # Set Header = If-Modified-Since: Gee, this date is invalid
383 # Expect Header = NO CHANGE
385 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
386 # Expect Header = REMOVAL
387 TAG:^crunch-outgoing-cookies$
389 #######################################################
390 # Test session-cookies-only
392 # XXX: pretty useless as session-cookies-only doesn't
393 # affect client headers.
394 #######################################################
397 -crunch-outgoing-cookies \
398 -crunch-incoming-cookies \
399 -limit-cookie-lifetime \
400 +session-cookies-only \
401 -hide-if-modified-since \
403 # Set Header = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
404 # Expect Header = NO CHANGE
406 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
407 # Expect Header = NO CHANGE
408 TAG:^session-cookies-only$
410 #######################################################
411 # Test change-x-forwarded-for
412 #######################################################
415 -change-x-forwarded-for \
417 # Set Header = X-Forwarded-For: 10.0.0.1
418 # Expect Header = NO CHANGE
419 TAG:^-change-x-forwarded-for$
422 +change-x-forwarded-for{block} \
424 # Set Header = X-Forwarded-For: 10.0.0.1
425 # Expect Header = REMOVAL
426 TAG:^change-x-forwarded-for\{block\}$
429 +change-x-forwarded-for{add} \
431 # Set Header = X-Forwarded-For: 10.0.0.1
432 # Expect Header = SOME CHANGE
433 TAG:^change-x-forwarded-for\{add\}$
435 #######################################################
436 # Test hide-from-header
437 #######################################################
440 +hide-from-header{block}\
442 # Set Header = From: schneewitchen@example.org
443 # Expect Header = REMOVAL
444 TAG:^hide-from-header\{block\}$
447 +hide-from-header{siebenzwerge@example.org}\
449 # Set Header = From: schneewitchen@example.org
450 # Expect Header = From: siebenzwerge@example.org
451 TAG:^hide-from-header\{siebenzwerge@example.org\}$
453 #######################################################
454 # Test prevent-compression
455 #######################################################
458 +prevent-compression\
460 # Set Header = Accept-Encoding: gzip, deflate
461 # Expect Header = REMOVAL
463 # Set Header = Accept-Encoding: gzip
464 # Expect Header = REMOVAL
466 # Set Header = Accept-Encoding: deflate
467 # Expect Header = REMOVAL
468 TAG:^prevent-compression$
470 #######################################################
471 # Test content filters which could cause problems with
473 #######################################################
476 -client-header-tagger{range-requests} \
477 +deanimate-gifs{last} \
480 # Set Header = Range: bytes=1234-5678
481 # Expect Header = REMOVAL
482 # Set Header = Range: bytes=1-5
483 # Expect Header = REMOVAL
484 # Set Header = If-Range: bytes=1234-5678
485 # Expect Header = REMOVAL
486 # Set Header = Request-Range: bytes=1234-5678
487 # Expect Header = REMOVAL
488 # Set Header = Range: foo
489 # Expect Header = REMOVAL
490 # Set Header = If-Range: foo
491 # Expect Header = REMOVAL
492 # Set Header = Request-Range: foo
493 # Expect Header = REMOVAL
494 # Set Header = Range: bytes=0-5678
495 # Expect Header = NO CHANGE
496 # Set Header = Range: bytes=0-
497 # Expect Header = NO CHANGE
498 # Set Header = If-Range: bytes=0-5678
499 # Expect Header = NO CHANGE
500 # Set Header = If-Range: bytes=0-
501 # Expect Header = NO CHANGE
502 # Set Header = Request-Range: bytes=0-5678
503 # Expect Header = NO CHANGE
504 # Set Header = Request-Range: bytes=0-
505 # Expect Header = NO CHANGE
506 TAG:^deanimate-gifs\{last\}$
509 -client-header-tagger{range-requests} \
511 +filter{banners-by-size} \
513 # Set Header = Range: bytes=1234-5678
514 # Expect Header = REMOVAL
515 # Set Header = Range: bytes=1-5
516 # Expect Header = REMOVAL
517 # Set Header = If-Range: bytes=1234-5678
518 # Expect Header = REMOVAL
519 # Set Header = Request-Range: bytes=1234-5678
520 # Expect Header = REMOVAL
521 # Set Header = Range: bytes=1-5
522 # Expect Header = REMOVAL
523 # Set Header = If-Range: bytes=1234-5678
524 # Expect Header = REMOVAL
525 # Set Header = Request-Range: bytes=1234-5678
526 # Expect Header = REMOVAL
527 # Set Header = Range: foo
528 # Expect Header = REMOVAL
529 # Set Header = If-Range: foo
530 # Expect Header = REMOVAL
531 # Set Header = Request-Range: foo
532 # Expect Header = REMOVAL
533 # Set Header = Range: bytes=0-5678
534 # Expect Header = NO CHANGE
535 # Set Header = Range: bytes=0-
536 # Expect Header = NO CHANGE
537 # Set Header = If-Range: bytes=0-5678
538 # Expect Header = NO CHANGE
539 # Set Header = If-Range: bytes=0-
540 # Expect Header = NO CHANGE
541 # Set Header = Request-Range: bytes=0-5678
542 # Expect Header = NO CHANGE
543 # Set Header = Request-Range: bytes=0-
544 # Expect Header = NO CHANGE
545 TAG:^filter\{banners-by-size\}$
548 -client-header-tagger{range-requests} \
552 # Set Header = Range: bytes=1234-5678
553 # Expect Header = NO CHANGE
554 # Set Header = If-Range: bytes=1234-5678
555 # Expect Header = NO CHANGE
556 # Set Header = Request-Range: bytes=1234-5678
557 # Expect Header = NO CHANGE
558 TAG:^no-content-filter$
561 # Set Header = Connection: keep-alive
562 # Expect Header = NO CHANGE
564 # Set Header = Connection:
565 # Expect Header = REMOVAL
567 TAG:^Connection: keep-alive$
570 # Set Header = Connection: keep-alive
571 # Expect Header = Connection: close
573 # Set Header = Connection:
574 # Expect Header = Connection: close
576 TAG:^Connection: close$
579 # Set Header = Connection: close
580 # Expect Header = NO CHANGE
582 TAG:^connection-sharing disabled$
585 # Set Header = Connection: close
586 # Expect Header = REMOVAL
588 # Set Header = Connection: keep-alive
589 # Expect Header = NO CHANGE
591 TAG:^connection-sharing enabled$
594 # XXX: Removing a header by not specifying a value is
595 # an inherited curl feature and could be viewed as a
596 # bug as far as Privoxy-Regression-Test is concerned.
599 # Expect Header = Host: p.p
603 # Set Header = Host: whatever.example.org
604 # Expect Header = NO CHANGE
605 TAG:^Host header other than the target host$
608 # Set Header = Keep-Alive: 20
609 # Expect Header = NO CHANGE
611 # Set Header = Keep-Alive: timeout=20, max=3
612 # Expect Header = NO CHANGE
614 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
615 # Expect Header = NO CHANGE
617 # Set Header = Keep-Alive: timeuot=20, max=3
618 # Expect Header = REMOVAL
620 # Set Header = Keep-Alive: twenty seconds please
621 # Expect Header = REMOVAL
623 TAG:^Parse Keep-Alive header$
626 # Set Header = Keep-Alive: 20
627 # Expect Header = REMOVAL
629 # Set Header = Keep-Alive: timeout=20, max=3
630 # Expect Header = REMOVAL
632 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
633 # Expect Header = REMOVAL
635 TAG:^Keep-Alive header removal$
638 # XXX: check the RFC to use a real value
639 # Set Header = proxy-connection: keep-alive
640 # Expect Header = REMOVAL
641 TAG:^Proxy-Connection removal$
644 # Set Header = Proxy-Connection: keep-alive
645 # Expect Header = REMOVAL
646 TAG:^Proxy-Connection removal$
649 # These are somewhat redundant when testing with
650 # GET requests, but I want to remember then when
651 # TRACE requests are supported.
653 # Set Header = Max-Forwards: 0
654 # Expect Header = NO CHANGE
655 # Set Header = Max-Forwards: 1
656 # Expect Header = NO CHANGE
657 # Set Header = Max-Forwards: -1
658 # Expect Header = NO CHANGE
659 # Set Header = Max-Forwards: 3
660 # Expect Header = NO CHANGE
661 TAG:^Max-Forwards header without TRACE method$
664 # Set Header = Proxy-Authorization: blafaseldieda
665 # Expect Header = REMOVAL
667 TAG:^Proxy-Authorization header removal$
670 # Set Header = Proxy-Authorization: blafaseldieda
671 # Expect Header = Proxy-Authorization: blafaseldieda
673 TAG:^Proxy-Authorization header forwarding$
675 ################################################################
677 # Fairly dumb tests for Privoxy CGI pages.
679 # These are mainly useful for checking for memory leaks
680 # with Valgrind or whether or not the user manual is installed
683 # Note that if "Expect Status Code" is missing, 200 is implied.
685 ################################################################
687 # Fetch Test = http://p.p/
688 # Fetch Test = http://p.p/die
689 # Expect Status Code = 404
691 # Fetch Test = http://p.p/die
692 # Expect Status Code = 200
694 # Fetch Test = http://p.p/show-status
695 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
696 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
697 # XXX: for the invalid ones we probably shouldn't return status code 200.
698 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
699 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
700 # Fetch Test = http://config.privoxy.org/show-status?file=actions
701 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
702 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
703 # Fetch Test = http://config.privoxy.org/show-status?file=filter
704 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
705 # Fetch Test = http://config.privoxy.org/show-status?file=trust
706 # Fetch Test = http://p.p/show-version
707 # Expect Status Code = 404
708 # Fetch Test = http://p.p/show-request
709 # Fetch Test = http://p.p/show-url-info
710 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
711 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
712 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
713 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
714 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
715 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
716 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
717 # Fetch Test = http://p.p/show-url-info?url=
718 # Fetch Test = http://p.p/show-url-info?url=%2F
719 # Depends on FEATURE_TOGGLE
720 # Fetch Test = http://p.p/toggle
722 # Fetch Test = http://p.p/toggle
723 # Expect Status Code = 403
725 # Fetch Test = http://p.p/edit-actions
726 # Expect Status Code = 403
728 # Fetch Test = http://p.p/eaa
729 # Expect Status Code = 403
731 # Fetch Test = http://p.p/eau
732 # Expect Status Code = 403
734 # Fetch Test = http://p.p/ear
735 # Expect Status Code = 403
737 # Fetch Test = http://p.p/eal
738 # Expect Status Code = 403
740 # Fetch Test = http://p.p/eafu
741 # Expect Status Code = 403
743 # Fetch Test = http://p.p/eas
744 # Expect Status Code = 403
746 # Fetch Test = http://p.p/easa
747 # Expect Status Code = 403
749 # Fetch Test = http://p.p/easr
750 # Expect Status Code = 403
752 # Fetch Test = http://p.p/eass
753 # Expect Status Code = 403
755 # Fetch Test = http://p.p/edit-actions-for-url
756 # Expect Status Code = 403
758 # Fetch Test = http://p.p/edit-actions-list
760 # Fetch Test = http://p.p/edit-actions-submit
761 # Expect Status Code = 403
763 # Expect Status Code = 403
764 # Fetch Test = http://p.p/edit-actions-url
765 # Expect Status Code = 403
767 # Fetch Test = http://p.p/edit-actions-url-form
768 # Expect Status Code = 403
770 # Fetch Test = http://p.p/edit-actions-add-url
771 # Expect Status Code = 403
773 # Fetch Test = http://p.p/edit-actions-add-url-form
774 # Expect Status Code = 403
776 # Fetch Test = http://p.p/edit-actions-remove-url
777 # Expect Status Code = 403
779 # Fetch Test = http://p.p/edit-actions-remove-url-form
780 # Expect Status Code = 403
782 # Fetch Test = http://p.p/edit-actions-section-add
783 # Expect Status Code = 403
785 # Fetch Test = http://p.p/edit-actions-section-remove
786 # Expect Status Code = 403
788 # Fetch Test = http://p.p/edit-actions-section-swap
789 # Expect Status Code = 403
791 # Fetch Test = http://p.p/error-favicon.ico
792 # Fetch Test = http://p.p/favicon.ico
793 # Fetch Test = http://p.p/robots.txt
794 # Fetch Test = http://p.p/send-banner
795 # Trusted CGI Request = http://p.p/send-stylesheet
796 # Fetch Test = http://p.p/send-stylesheet
797 # Expect Status Code = 403
798 # Fetch Test = http://p.p/t
799 # Fetch Test = http://p.p/url-info-osd.xml
800 # Fetch Test = http://p.p/client-tags
802 # Trusted CGI Request = http://p.p/toggle-client-tag
803 # Expect Status Code = 302
805 # Fetch Test = http://p.p/toggle-client-tag
806 # Expect Status Code = 403
809 # Trusted CGI Request = http://p.p/edit-actions
810 # Expect Status Code = 302
811 # Level = 12 # Depends on the CGI editor being enabled
812 # Fetch Test = http://p.p/does-not-exist
813 # Expect Status Code = 404
814 # Trusted CGI Request = http://p.p/eaa
816 # Trusted CGI Request = http://p.p/eau
818 # Trusted CGI Request = http://p.p/ear
820 # Trusted CGI Request = http://p.p/eal
822 # Trusted CGI Request = http://p.p/eafu
824 # Trusted CGI Request = http://p.p/eas
826 # Trusted CGI Request = http://p.p/easa
828 # Trusted CGI Request = http://p.p/easr
830 # Trusted CGI Request = http://p.p/eass
832 # Trusted CGI Request = http://p.p/edit-actions-for-url
834 # Trusted CGI Request = http://p.p/edit-actions-list
836 # Trusted CGI Request = http://p.p/edit-actions-submit
838 # Trusted CGI Request = http://p.p/edit-actions-url
840 # Trusted CGI Request = http://p.p/edit-actions-url-form
842 # Trusted CGI Request = http://p.p/edit-actions-add-url
844 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
846 # Trusted CGI Request = http://p.p/edit-actions-remove-url
848 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
850 # Trusted CGI Request = http://p.p/edit-actions-section-add
852 # Trusted CGI Request = http://p.p/edit-actions-section-remove
854 # Trusted CGI Request = http://p.p/edit-actions-section-swap
856 # Trusted CGI Request = http://p.p/send-stylesheet
858 # The following tests depend on Privoxy being configured to deliver the user manual
860 # Fetch Test = http://p.p/user-manual
861 # Expect Status Code = 302
863 # Fetch Test = http://p.p/user-manual/
865 # Fetch Test = http://p.p/user-manual/actions-file.html
867 # Fetch Test = http://p.p/user-manual/appendix.html
869 # Fetch Test = http://p.p/user-manual/config.html
871 # Fetch Test = http://p.p/user-manual/configuration.html
873 # Fetch Test = http://p.p/user-manual/contact.html
875 # Fetch Test = http://p.p/user-manual/copyright.html
877 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
879 # Fetch Test = http://p.p/user-manual/filter-file.html
881 # Fetch Test = http://p.p/user-manual/index.html
883 # Fetch Test = http://p.p/user-manual/installation.html
885 # Fetch Test = http://p.p/user-manual/introduction.html
887 # Fetch Test = http://p.p/user-manual/p_doc.css
889 # Fetch Test = http://p.p/user-manual/proxy2.jpg
891 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
893 # Fetch Test = http://p.p/user-manual/quickstart.html
895 # Fetch Test = http://p.p/user-manual/seealso.html
897 # Fetch Test = http://p.p/user-manual/startup.html
899 # Fetch Test = http://p.p/user-manual/templates.html
901 # Fetch Test = http://p.p/user-manual/whatsnew.html
905 # Method Test = OPTIONS
912 # Method Test = DELETE
913 # Method Test = OPTIONS
914 # Method Test = TRACE
915 # Method Test = CONNECT
917 # Method Test = PROPFIND
918 # Method Test = PROPPATCH
921 # Method Test = MKCOL
923 # Method Test = UNLOCK
924 # Method Test = BCOPY
925 # Method Test = BMOVE
926 # Method Test = BDELETE
927 # Method Test = BPROPFIND
928 # Method Test = BPROPPATCH
929 # Method Test = SUBSCRIBE
930 # Method Test = UNSUBSCRIBE
931 # Method Test = NOTIFY
933 # Method Test = VERSION-CONTROL
934 # Method Test = REPORT
935 # Method Test = CHECKOUT
936 # Method Test = CHECKIN
937 # Method Test = UNCHECKOUT
938 # Method Test = MKWORKSPACE
939 # Method Test = UPDATE
940 # Method Test = LABEL
941 # Method Test = MERGE
942 # Method Test = BASELINE-CONTROL
943 # Method Test = MKACTIVITY
944 # Method Test = PATCH
945 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
946 # Expect Status Code = 400
948 {+block{Forbidden Port. You are not supposed to see this.}}
949 config.privoxy.org:1-/
953 config.privoxy.org:3,79-81/
956 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
957 # 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
958 # Expect Status Code = 503
959 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/
961 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
962 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
963 # Expect Status Code = 503
964 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
966 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
967 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
968 # Expect Status Code = 503
969 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
971 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
972 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
973 # Expect Status Code = 503
974 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
976 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
977 # This one currently triggers the same error condition as the
978 # test above (socks5 server unreachable), but once Privoxy
979 # starts to properly reject invalid ports it should become useful.
981 # Fetch Test = http://invalid-forward5-gateway-port.example
982 # Expect Status Code = 503
983 invalid-forward5-gateway-port.example
985 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
986 # Fetch Test = http://forward5-null-gateway-host.example
987 # Expect Status Code = 503
988 forward5-null-gateway-host.example
990 {+limit-connect{443}}
991 # Fetch Test = http://www.forbidden-connect.example:444/
993 # Expect Status Code = 403
994 www.forbidden-connect.example/
996 {+block{This request failed to make it to the target destination which means the test succeeded.}}
997 # Fetch Test = http://www.blocked-request.example/blocked-request
998 # Expect Status Code = 403
999 www.blocked-request.example/blocked-request
1002 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
1003 # Expect Status Code = 403
1004 www.blocked-request.example/blocked-request-with-no-reason-specified
1006 # Some domain pattern tests
1008 {+block{domain pattern test}}
1009 # Blocked URL = http://domain-pattern-test.example/
1010 # Blocked URL = http://domain-pattern-test.example.org/
1011 domain-pattern-test.example.
1013 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
1014 # Blocked URL = http://trailing-dot.example.org./
1015 # Blocked URL = http://trailing-dot.example.org./foo
1016 trailing-dot.example.org
1019 # Just in case there is no white-space fuzzer in the house ...
1021 # Set Header = X-LWS-Test: no superfluous white space here
1022 # Expect Header = NO CHANGE
1023 # Set Header = X-LWS-Test: superfluous white space in the house
1024 # Expect Header = X-LWS-Test: superfluous white space in the house
1025 # Set Header = X-LWS-Test : superfluous white space in the house
1026 # Expect Header = X-LWS-Test: superfluous white space in the house
1027 # Set Header = X-LWS-Test: :superfluous white space in the house
1028 # Expect Header = X-LWS-Test: :superfluous white space in the house
1029 # Set Header = X-LWS-Test: :no superfluous white space here
1030 # Expect Header = NO CHANGE
1031 # Set Header = X-LWS-Test: superfluous white tabs in the house
1032 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1033 # Set Header = X-LWS-Test : superfluous white tabs in the house
1034 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1035 # Set Header = X-LWS-Test: "leave quoted lws alone"
1036 # Expect Header = X-LWS-Test: "leave quoted lws alone"
1037 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
1038 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
1039 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1040 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1041 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1042 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1043 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1044 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1047 {+fast-redirects{check-decoded-url}}
1048 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
1049 # Redirect Destination = http://redirected1.example.net/
1050 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F¶meter=not-part-of-the-redirected-url
1051 # Redirect Destination = http://redirected2.example.net/
1052 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F¶meter=not-part-of-the-redirected-url
1053 # Redirect Destination = http://redirected3.example.net/
1054 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
1055 # Redirect Destination = http://redirected4.example.net/¶meter=part-of-the-redirected-url
1056 # 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
1057 # Redirect Destination = http://redirected5.example.net/¶meter2=part-of-the-redirected-url2
1058 # 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
1059 # Redirect Destination = http://redirected6.example.net/¶meter2=part-of-the-redirected-url2
1060 # 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
1061 # Redirect Destination = http://redirected7.example.net/¶meter1=part-of-the-redirected-url1
1062 # 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
1063 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1064 # 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
1065 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1066 # 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
1067 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1068 # 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
1069 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1070 redirect.example.net/
1071 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
1072 # Redirect Destination = http://redirect2.example.net/
1073 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
1074 # Redirect Destination = http://redirect2.example.net/
1075 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
1076 # Redirect Destination = http://redirect2.example.net/
1077 # These tests verify that Privoxy behaves as intended,
1078 # given that the encoded redirect URLs are invalid,
1079 # there are no correct redirect URLs.
1080 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
1081 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
1082 # 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%%
1083 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
1085 {+fast-redirects{simple-check}}
1086 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1087 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1088 redirect2.example.net/