1 #############################################################################
2 # $Id: regression-tests.action,v 1.59 2014/11/20 15:29:57 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-2014 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 #############################################################################
30 for-privoxy-version=3.0.22
32 # Some dependencies Privoxy-Regression-Test should know about:
34 # Level 9 needs = config line user-manual\s+(\.?\.?/|[A-Za-z]:)
35 # Level 12 needs = feature status FEATURE_CGI_EDIT_ACTIONS Yes
36 # Level 12 needs = config line enable-edit-actions\s+1
37 # Level 13 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
38 # Level 13 needs = config line keep-alive-timeout\s+(2[1-9]+|[3-9]\d+|1\d{2,})
39 # Level 14 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE No
40 # Level 15 needs = config line connection-sharing\s+0
41 # Level 16 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
42 # Level 16 needs = config line connection-sharing\s+1
43 # Level 17 needs = feature status FEATURE_64_BIT_TIME_T Yes
44 # Level 18 needs = feature status FEATURE_GRACEFUL_TERMINATION No
45 # Level 19 needs = feature status FEATURE_GRACEFUL_TERMINATION Yes
46 # Level 20 needs = feature status FEATURE_TOGGLE Yes
47 # Level 21 needs = feature status FEATURE_TOGGLE No
48 # Level 22 needs = config line enable-proxy-authentication-forwarding\s+0
49 # Level 23 needs = config line enable-proxy-authentication-forwarding\s+1
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
332 TAG:^hide-if-modified-since\{\+60\}$
334 {+hide-if-modified-since{60} -crunch-if-none-match}
335 # Set Header = If-Modified-Since: Gee, this date is invalid
336 # Expect Header = REMOVAL
337 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
338 # Expect Header = SOME CHANGE
339 TAG:^hide-if-modified-since\{60\}$
341 {+hide-if-modified-since{+0} -crunch-if-none-match}
342 # Set Header = If-Modified-Since: Gee, this date is invalid
343 # Expect Header = REMOVAL
344 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
345 # Expect Header = NO CHANGE
346 TAG:^hide-if-modified-since\{\+0\}$
348 {+hide-if-modified-since{-0} -crunch-if-none-match}
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
353 TAG:^hide-if-modified-since\{-0\}$
355 {+hide-if-modified-since{0} -crunch-if-none-match}
356 # Set Header = If-Modified-Since: Gee, this date is invalid
357 # Expect Header = REMOVAL
358 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
359 # Expect Header = NO CHANGE
360 TAG:^hide-if-modified-since\{0\}$
362 {+hide-if-modified-since{NaN} -crunch-if-none-match}
363 # Set Header = If-Modified-Since: Gee, this date is invalid
364 # Expect Header = REMOVAL
365 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
366 # Expect Header = NO CHANGE
367 TAG:^hide-if-modified-since\{NaN\}$
370 #######################################################
371 # Test crunch-outgoing-cookies
372 #######################################################
375 +crunch-outgoing-cookies \
376 -crunch-incoming-cookies \
377 -limit-cookie-lifetime \
378 -session-cookies-only \
379 -hide-if-modified-since \
381 # Set Header = If-Modified-Since: Gee, this date is invalid
382 # Expect Header = NO CHANGE
384 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
385 # Expect Header = REMOVAL
386 TAG:^crunch-outgoing-cookies$
388 #######################################################
389 # Test session-cookies-only
391 # XXX: pretty useless as session-cookies-only doesn't
392 # affect client headers.
393 #######################################################
396 -crunch-outgoing-cookies \
397 -crunch-incoming-cookies \
398 -limit-cookie-lifetime \
399 +session-cookies-only \
400 -hide-if-modified-since \
402 # Set Header = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
403 # Expect Header = NO CHANGE
405 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
406 # Expect Header = NO CHANGE
407 TAG:^session-cookies-only$
409 #######################################################
410 # Test change-x-forwarded-for
411 #######################################################
414 -change-x-forwarded-for \
416 # Set Header = X-Forwarded-For: 10.0.0.1
417 # Expect Header = NO CHANGE
418 TAG:^-change-x-forwarded-for$
421 +change-x-forwarded-for{block} \
423 # Set Header = X-Forwarded-For: 10.0.0.1
424 # Expect Header = REMOVAL
425 TAG:^change-x-forwarded-for\{block\}$
428 +change-x-forwarded-for{add} \
430 # Set Header = X-Forwarded-For: 10.0.0.1
431 # Expect Header = SOME CHANGE
432 TAG:^change-x-forwarded-for\{add\}$
434 #######################################################
435 # Test hide-from-header
436 #######################################################
439 +hide-from-header{block}\
441 # Set Header = From: schneewitchen@example.org
442 # Expect Header = REMOVAL
443 TAG:^hide-from-header\{block\}$
446 +hide-from-header{siebenzwerge@example.org}\
448 # Set Header = From: schneewitchen@example.org
449 # Expect Header = From: siebenzwerge@example.org
450 TAG:^hide-from-header\{siebenzwerge@example.org\}$
452 #######################################################
453 # Test prevent-compression
454 #######################################################
457 +prevent-compression\
459 # Set Header = Accept-Encoding: gzip, deflate
460 # Expect Header = REMOVAL
462 # Set Header = Accept-Encoding: gzip
463 # Expect Header = REMOVAL
465 # Set Header = Accept-Encoding: deflate
466 # Expect Header = REMOVAL
467 TAG:^prevent-compression$
469 #######################################################
470 # Test content filters which could cause problems with
472 #######################################################
475 -client-header-tagger{range-requests} \
476 +deanimate-gifs{last} \
479 # Set Header = Range: bytes=1234-5678
480 # Expect Header = REMOVAL
481 # Set Header = Range: bytes=1-5
482 # Expect Header = REMOVAL
483 # Set Header = If-Range: bytes=1234-5678
484 # Expect Header = REMOVAL
485 # Set Header = Request-Range: bytes=1234-5678
486 # Expect Header = REMOVAL
487 # Set Header = Range: foo
488 # Expect Header = REMOVAL
489 # Set Header = If-Range: foo
490 # Expect Header = REMOVAL
491 # Set Header = Request-Range: foo
492 # Expect Header = REMOVAL
493 # Set Header = Range: bytes=0-5678
494 # Expect Header = NO CHANGE
495 # Set Header = Range: bytes=0-
496 # Expect Header = NO CHANGE
497 # Set Header = If-Range: bytes=0-5678
498 # Expect Header = NO CHANGE
499 # Set Header = If-Range: bytes=0-
500 # Expect Header = NO CHANGE
501 # Set Header = Request-Range: bytes=0-5678
502 # Expect Header = NO CHANGE
503 # Set Header = Request-Range: bytes=0-
504 # Expect Header = NO CHANGE
505 TAG:^deanimate-gifs\{last\}$
508 -client-header-tagger{range-requests} \
510 +filter{banners-by-size} \
512 # Set Header = Range: bytes=1234-5678
513 # Expect Header = REMOVAL
514 # Set Header = Range: bytes=1-5
515 # Expect Header = REMOVAL
516 # Set Header = If-Range: bytes=1234-5678
517 # Expect Header = REMOVAL
518 # Set Header = Request-Range: bytes=1234-5678
519 # Expect Header = REMOVAL
520 # Set Header = Range: bytes=1-5
521 # Expect Header = REMOVAL
522 # Set Header = If-Range: bytes=1234-5678
523 # Expect Header = REMOVAL
524 # Set Header = Request-Range: bytes=1234-5678
525 # Expect Header = REMOVAL
526 # Set Header = Range: foo
527 # Expect Header = REMOVAL
528 # Set Header = If-Range: foo
529 # Expect Header = REMOVAL
530 # Set Header = Request-Range: foo
531 # Expect Header = REMOVAL
532 # Set Header = Range: bytes=0-5678
533 # Expect Header = NO CHANGE
534 # Set Header = Range: bytes=0-
535 # Expect Header = NO CHANGE
536 # Set Header = If-Range: bytes=0-5678
537 # Expect Header = NO CHANGE
538 # Set Header = If-Range: bytes=0-
539 # Expect Header = NO CHANGE
540 # Set Header = Request-Range: bytes=0-5678
541 # Expect Header = NO CHANGE
542 # Set Header = Request-Range: bytes=0-
543 # Expect Header = NO CHANGE
544 TAG:^filter\{banners-by-size\}$
547 -client-header-tagger{range-requests} \
551 # Set Header = Range: bytes=1234-5678
552 # Expect Header = NO CHANGE
553 # Set Header = If-Range: bytes=1234-5678
554 # Expect Header = NO CHANGE
555 # Set Header = Request-Range: bytes=1234-5678
556 # Expect Header = NO CHANGE
557 TAG:^no-content-filter$
560 # Set Header = Connection: keep-alive
561 # Expect Header = NO CHANGE
563 # Set Header = Connection:
564 # Expect Header = REMOVAL
566 TAG:^Connection: keep-alive$
569 # Set Header = Connection: keep-alive
570 # Expect Header = Connection: close
572 # Set Header = Connection:
573 # Expect Header = Connection: close
575 TAG:^Connection: close$
578 # Set Header = Connection: close
579 # Expect Header = NO CHANGE
581 TAG:^connection-sharing disabled$
584 # Set Header = Connection: close
585 # Expect Header = REMOVAL
587 # Set Header = Connection: keep-alive
588 # Expect Header = NO CHANGE
590 TAG:^connection-sharing enabled$
593 # XXX: Removing a header by not specifying a value is
594 # an inherited curl feature and could be viewed as a
595 # bug as far as Privoxy-Regression-Test is concerned.
598 # Expect Header = Host: p.p
602 # Set Header = Host: whatever.example.org
603 # Expect Header = NO CHANGE
604 TAG:^Host header other than the target host$
607 # Set Header = Keep-Alive: 20
608 # Expect Header = NO CHANGE
610 # Set Header = Keep-Alive: timeout=20, max=3
611 # Expect Header = NO CHANGE
613 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
614 # Expect Header = NO CHANGE
616 # Set Header = Keep-Alive: timeuot=20, max=3
617 # Expect Header = REMOVAL
619 # Set Header = Keep-Alive: twenty seconds please
620 # Expect Header = REMOVAL
622 TAG:^Parse Keep-Alive header$
625 # Set Header = Keep-Alive: 20
626 # Expect Header = REMOVAL
628 # Set Header = Keep-Alive: timeout=20, max=3
629 # Expect Header = REMOVAL
631 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
632 # Expect Header = REMOVAL
634 TAG:^Keep-Alive header removal$
637 # XXX: check the RFC to use a real value
638 # Set Header = proxy-connection: keep-alive
639 # Expect Header = REMOVAL
640 TAG:^Proxy-Connection removal$
643 # Set Header = Proxy-Connection: keep-alive
644 # Expect Header = REMOVAL
645 TAG:^Proxy-Connection removal$
648 # These are somewhat redundant when testing with
649 # GET requests, but I want to remember then when
650 # TRACE requests are supported.
652 # Set Header = Max-Forwards: 0
653 # Expect Header = NO CHANGE
654 # Set Header = Max-Forwards: 1
655 # Expect Header = NO CHANGE
656 # Set Header = Max-Forwards: -1
657 # Expect Header = NO CHANGE
658 # Set Header = Max-Forwards: 3
659 # Expect Header = NO CHANGE
660 TAG:^Max-Forwards header without TRACE method$
663 # Set Header = Proxy-Authorization: blafaseldieda
664 # Expect Header = REMOVAL
666 TAG:^Proxy-Authorization header removal$
669 # Set Header = Proxy-Authorization: blafaseldieda
670 # Expect Header = Proxy-Authorization: blafaseldieda
672 TAG:^Proxy-Authorization header forwarding$
674 ################################################################
676 # Fairly dumb tests for Privoxy CGI pages.
678 # These are mainly useful for checking for memory leaks
679 # with Valgrind or whether or not the user manual is installed
680 # correctly and are unlikely to actually detect any
682 # Note that if "Expect Status Code" is missing, 200 is implied.
684 ################################################################
686 # Fetch Test = http://p.p/
687 # Fetch Test = http://p.p/die
688 # Expect Status Code = 404
690 # Fetch Test = http://p.p/die
691 # Expect Status Code = 200
693 # Fetch Test = http://p.p/show-status
694 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
695 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
696 # XXX: for the invalid ones we probably shouldn't return status code 200.
697 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
698 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
699 # Fetch Test = http://config.privoxy.org/show-status?file=actions
700 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
701 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
702 # Fetch Test = http://config.privoxy.org/show-status?file=filter
703 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
704 # Fetch Test = http://config.privoxy.org/show-status?file=trust
705 # Fetch Test = http://p.p/show-version
706 # Fetch Test = http://p.p/show-request
707 # Fetch Test = http://p.p/show-url-info
708 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
709 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
710 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
711 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
712 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
713 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
714 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
715 # Fetch Test = http://p.p/show-url-info?url=
716 # Fetch Test = http://p.p/show-url-info?url=%2F
717 # Depends on FEATURE_TOGGLE
718 # Fetch Test = http://p.p/toggle
720 # Fetch Test = http://p.p/toggle
721 # Expect Status Code = 404
723 # Fetch Test = http://p.p/edit-actions
725 # Fetch Test = http://p.p/eaa
727 # Fetch Test = http://p.p/eau
729 # Fetch Test = http://p.p/ear
731 # Fetch Test = http://p.p/eal
733 # Fetch Test = http://p.p/eafu
735 # Fetch Test = http://p.p/eas
737 # Fetch Test = http://p.p/easa
739 # Fetch Test = http://p.p/easr
741 # Fetch Test = http://p.p/eass
743 # Fetch Test = http://p.p/edit-actions-for-url
745 # Fetch Test = http://p.p/edit-actions-list
747 # Fetch Test = http://p.p/edit-actions-submit
749 # Fetch Test = http://p.p/edit-actions-url
751 # Fetch Test = http://p.p/edit-actions-url-form
753 # Fetch Test = http://p.p/edit-actions-add-url
755 # Fetch Test = http://p.p/edit-actions-add-url-form
757 # Fetch Test = http://p.p/edit-actions-remove-url
759 # Fetch Test = http://p.p/edit-actions-remove-url-form
761 # Fetch Test = http://p.p/edit-actions-section-add
763 # Fetch Test = http://p.p/edit-actions-section-remove
765 # Fetch Test = http://p.p/edit-actions-section-swap
767 # Fetch Test = http://p.p/error-favicon.ico
768 # Fetch Test = http://p.p/favicon.ico
769 # Fetch Test = http://p.p/robots.txt
770 # Fetch Test = http://p.p/send-banner
771 # Fetch Test = http://p.p/send-stylesheet
772 # Fetch Test = http://p.p/t
773 # Fetch Test = http://p.p/url-info-osd.xml
775 # Trusted CGI Request = http://p.p/edit-actions
776 # Expect Status Code = 302
777 # Level = 12 # Depends on the CGI editor being enabled
778 # Fetch Test = http://p.p/does-not-exist
779 # Expect Status Code = 404
780 # Trusted CGI Request = http://p.p/eaa
782 # Trusted CGI Request = http://p.p/eau
784 # Trusted CGI Request = http://p.p/ear
786 # Trusted CGI Request = http://p.p/eal
788 # Trusted CGI Request = http://p.p/eafu
790 # Trusted CGI Request = http://p.p/eas
792 # Trusted CGI Request = http://p.p/easa
794 # Trusted CGI Request = http://p.p/easr
796 # Trusted CGI Request = http://p.p/eass
798 # Trusted CGI Request = http://p.p/edit-actions-for-url
800 # Trusted CGI Request = http://p.p/edit-actions-list
802 # Trusted CGI Request = http://p.p/edit-actions-submit
804 # Trusted CGI Request = http://p.p/edit-actions-url
806 # Trusted CGI Request = http://p.p/edit-actions-url-form
808 # Trusted CGI Request = http://p.p/edit-actions-add-url
810 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
812 # Trusted CGI Request = http://p.p/edit-actions-remove-url
814 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
816 # Trusted CGI Request = http://p.p/edit-actions-section-add
818 # Trusted CGI Request = http://p.p/edit-actions-section-remove
820 # Trusted CGI Request = http://p.p/edit-actions-section-swap
822 # Trusted CGI Request = http://p.p/send-stylesheet
824 # The following tests depend on Privoxy being configured to deliver the user manual
826 # Fetch Test = http://p.p/user-manual
827 # Expect Status Code = 302
829 # Fetch Test = http://p.p/user-manual/
831 # Fetch Test = http://p.p/user-manual/actions-file.html
833 # Fetch Test = http://p.p/user-manual/appendix.html
835 # Fetch Test = http://p.p/user-manual/config.html
837 # Fetch Test = http://p.p/user-manual/configuration.html
839 # Fetch Test = http://p.p/user-manual/contact.html
841 # Fetch Test = http://p.p/user-manual/copyright.html
843 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
845 # Fetch Test = http://p.p/user-manual/filter-file.html
847 # Fetch Test = http://p.p/user-manual/index.html
849 # Fetch Test = http://p.p/user-manual/installation.html
851 # Fetch Test = http://p.p/user-manual/introduction.html
853 # Fetch Test = http://p.p/user-manual/p_doc.css
855 # Fetch Test = http://p.p/user-manual/proxy2.jpg
857 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
859 # Fetch Test = http://p.p/user-manual/quickstart.html
861 # Fetch Test = http://p.p/user-manual/seealso.html
863 # Fetch Test = http://p.p/user-manual/startup.html
865 # Fetch Test = http://p.p/user-manual/templates.html
867 # Fetch Test = http://p.p/user-manual/whatsnew.html
871 # Method Test = OPTIONS
878 # Method Test = DELETE
879 # Method Test = OPTIONS
880 # Method Test = TRACE
881 # Method Test = CONNECT
882 # Method Test = PROPFIND
883 # Method Test = PROPPATCH
886 # Method Test = MKCOL
888 # Method Test = UNLOCK
889 # Method Test = BCOPY
890 # Method Test = BMOVE
891 # Method Test = BDELETE
892 # Method Test = BPROPFIND
893 # Method Test = BPROPPATCH
894 # Method Test = SUBSCRIBE
895 # Method Test = UNSUBSCRIBE
896 # Method Test = NOTIFY
898 # Method Test = VERSION-CONTROL
899 # Method Test = REPORT
900 # Method Test = CHECKOUT
901 # Method Test = CHECKIN
902 # Method Test = UNCHECKOUT
903 # Method Test = MKWORKSPACE
904 # Method Test = UPDATE
905 # Method Test = LABEL
906 # Method Test = MERGE
907 # Method Test = BASELINE-CONTROL
908 # Method Test = MKACTIVITY
909 # Method Test = PATCH
910 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
911 # Expect Status Code = 400
913 {+block{Forbidden Port. You are not supposed to see this.}}
914 config.privoxy.org:1-/
918 config.privoxy.org:3,79-81/
921 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
922 # 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
923 # Expect Status Code = 503
924 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/
926 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
927 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
928 # Expect Status Code = 503
929 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
931 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
932 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
933 # Expect Status Code = 503
934 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
936 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
937 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
938 # Expect Status Code = 503
939 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
941 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
942 # This one currently triggers the same error condition as the
943 # test above (socks5 server unreachable), but once Privoxy
944 # starts to properly reject invalid ports it should become useful.
946 # Fetch Test = http://invalid-forward5-gateway-port.example
947 # Expect Status Code = 503
948 invalid-forward5-gateway-port.example
950 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
951 # Fetch Test = http://forward5-null-gateway-host.example
952 # Expect Status Code = 503
953 forward5-null-gateway-host.example
955 {+limit-connect{443}}
956 # Fetch Test = http://www.forbidden-connect.example:444/
958 # Expect Status Code = 403
959 www.forbidden-connect.example/
961 {+block{This request failed to make it to the target destination which means the test succeeded.}}
962 # Fetch Test = http://www.blocked-request.example/blocked-request
963 # Expect Status Code = 403
964 www.blocked-request.example/blocked-request
967 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
968 # Expect Status Code = 403
969 www.blocked-request.example/blocked-request-with-no-reason-specified
971 # Some domain pattern tests
973 {+block{domain pattern test}}
974 # Blocked URL = http://domain-pattern-test.example/
975 # Blocked URL = http://domain-pattern-test.example.org/
976 domain-pattern-test.example.
978 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
979 # Blocked URL = http://trailing-dot.example.org./
980 # Blocked URL = http://trailing-dot.example.org./foo
981 trailing-dot.example.org
984 # Just in case there is no white-space fuzzer in the house ...
986 # Set Header = X-LWS-Test: no superfluous white space here
987 # Expect Header = NO CHANGE
988 # Set Header = X-LWS-Test: superfluous white space in the house
989 # Expect Header = X-LWS-Test: superfluous white space in the house
990 # Set Header = X-LWS-Test : superfluous white space in the house
991 # Expect Header = X-LWS-Test: superfluous white space in the house
992 # Set Header = X-LWS-Test: :superfluous white space in the house
993 # Expect Header = X-LWS-Test: :superfluous white space in the house
994 # Set Header = X-LWS-Test: :no superfluous white space here
995 # Expect Header = NO CHANGE
996 # Set Header = X-LWS-Test: superfluous white tabs in the house
997 # Expect Header = X-LWS-Test: superfluous white tabs in the house
998 # Set Header = X-LWS-Test : superfluous white tabs in the house
999 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1000 # Set Header = X-LWS-Test: "leave quoted lws alone"
1001 # Expect Header = X-LWS-Test: "leave quoted lws alone"
1002 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
1003 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
1004 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1005 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1006 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1007 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1008 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1009 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1012 {+fast-redirects{check-decoded-url}}
1013 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
1014 # Redirect Destination = http://redirected1.example.net/
1015 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F¶meter=not-part-of-the-redirected-url
1016 # Redirect Destination = http://redirected2.example.net/
1017 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F¶meter=not-part-of-the-redirected-url
1018 # Redirect Destination = http://redirected3.example.net/
1019 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
1020 # Redirect Destination = http://redirected4.example.net/¶meter=part-of-the-redirected-url
1021 # 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
1022 # Redirect Destination = http://redirected5.example.net/¶meter2=part-of-the-redirected-url2
1023 # 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
1024 # Redirect Destination = http://redirected6.example.net/¶meter2=part-of-the-redirected-url2
1025 # 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
1026 # Redirect Destination = http://redirected7.example.net/¶meter1=part-of-the-redirected-url1
1027 # 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
1028 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1029 # 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
1030 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1031 # 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
1032 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1033 # 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
1034 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1035 redirect.example.net/
1036 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
1037 # Redirect Destination = http://redirect2.example.net/
1038 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
1039 # Redirect Destination = http://redirect2.example.net/
1040 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
1041 # Redirect Destination = http://redirect2.example.net/
1042 # These tests verify that Privoxy behaves as intended,
1043 # given that the encoded redirect URLs are invalid,
1044 # there are no correct redirect URLs.
1045 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
1046 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
1047 # 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%%
1048 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
1050 {+fast-redirects{simple-check}}
1051 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1052 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1053 redirect2.example.net/