1 #############################################################################
2 # $Id: regression-tests.action,v 1.60 2016/05/08 10:44:56 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
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
681 # correctly and are unlikely to actually detect any
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 # Fetch Test = http://p.p/show-request
708 # Fetch Test = http://p.p/show-url-info
709 # Fetch Test = http://p.p/show-url-info?url=www.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=HTTp:%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=HtTps:%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=FTp:%2F%2Fwww.privoxy.org%2F
716 # Fetch Test = http://p.p/show-url-info?url=
717 # Fetch Test = http://p.p/show-url-info?url=%2F
718 # Depends on FEATURE_TOGGLE
719 # Fetch Test = http://p.p/toggle
721 # Fetch Test = http://p.p/toggle
722 # Expect Status Code = 404
724 # Fetch Test = http://p.p/edit-actions
726 # Fetch Test = http://p.p/eaa
728 # Fetch Test = http://p.p/eau
730 # Fetch Test = http://p.p/ear
732 # Fetch Test = http://p.p/eal
734 # Fetch Test = http://p.p/eafu
736 # Fetch Test = http://p.p/eas
738 # Fetch Test = http://p.p/easa
740 # Fetch Test = http://p.p/easr
742 # Fetch Test = http://p.p/eass
744 # Fetch Test = http://p.p/edit-actions-for-url
746 # Fetch Test = http://p.p/edit-actions-list
748 # Fetch Test = http://p.p/edit-actions-submit
750 # Fetch Test = http://p.p/edit-actions-url
752 # Fetch Test = http://p.p/edit-actions-url-form
754 # Fetch Test = http://p.p/edit-actions-add-url
756 # Fetch Test = http://p.p/edit-actions-add-url-form
758 # Fetch Test = http://p.p/edit-actions-remove-url
760 # Fetch Test = http://p.p/edit-actions-remove-url-form
762 # Fetch Test = http://p.p/edit-actions-section-add
764 # Fetch Test = http://p.p/edit-actions-section-remove
766 # Fetch Test = http://p.p/edit-actions-section-swap
768 # Fetch Test = http://p.p/error-favicon.ico
769 # Fetch Test = http://p.p/favicon.ico
770 # Fetch Test = http://p.p/robots.txt
771 # Fetch Test = http://p.p/send-banner
772 # Fetch Test = http://p.p/send-stylesheet
773 # Fetch Test = http://p.p/t
774 # Fetch Test = http://p.p/url-info-osd.xml
776 # Trusted CGI Request = http://p.p/edit-actions
777 # Expect Status Code = 302
778 # Level = 12 # Depends on the CGI editor being enabled
779 # Fetch Test = http://p.p/does-not-exist
780 # Expect Status Code = 404
781 # Trusted CGI Request = http://p.p/eaa
783 # Trusted CGI Request = http://p.p/eau
785 # Trusted CGI Request = http://p.p/ear
787 # Trusted CGI Request = http://p.p/eal
789 # Trusted CGI Request = http://p.p/eafu
791 # Trusted CGI Request = http://p.p/eas
793 # Trusted CGI Request = http://p.p/easa
795 # Trusted CGI Request = http://p.p/easr
797 # Trusted CGI Request = http://p.p/eass
799 # Trusted CGI Request = http://p.p/edit-actions-for-url
801 # Trusted CGI Request = http://p.p/edit-actions-list
803 # Trusted CGI Request = http://p.p/edit-actions-submit
805 # Trusted CGI Request = http://p.p/edit-actions-url
807 # Trusted CGI Request = http://p.p/edit-actions-url-form
809 # Trusted CGI Request = http://p.p/edit-actions-add-url
811 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
813 # Trusted CGI Request = http://p.p/edit-actions-remove-url
815 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
817 # Trusted CGI Request = http://p.p/edit-actions-section-add
819 # Trusted CGI Request = http://p.p/edit-actions-section-remove
821 # Trusted CGI Request = http://p.p/edit-actions-section-swap
823 # Trusted CGI Request = http://p.p/send-stylesheet
825 # The following tests depend on Privoxy being configured to deliver the user manual
827 # Fetch Test = http://p.p/user-manual
828 # Expect Status Code = 302
830 # Fetch Test = http://p.p/user-manual/
832 # Fetch Test = http://p.p/user-manual/actions-file.html
834 # Fetch Test = http://p.p/user-manual/appendix.html
836 # Fetch Test = http://p.p/user-manual/config.html
838 # Fetch Test = http://p.p/user-manual/configuration.html
840 # Fetch Test = http://p.p/user-manual/contact.html
842 # Fetch Test = http://p.p/user-manual/copyright.html
844 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
846 # Fetch Test = http://p.p/user-manual/filter-file.html
848 # Fetch Test = http://p.p/user-manual/index.html
850 # Fetch Test = http://p.p/user-manual/installation.html
852 # Fetch Test = http://p.p/user-manual/introduction.html
854 # Fetch Test = http://p.p/user-manual/p_doc.css
856 # Fetch Test = http://p.p/user-manual/proxy2.jpg
858 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
860 # Fetch Test = http://p.p/user-manual/quickstart.html
862 # Fetch Test = http://p.p/user-manual/seealso.html
864 # Fetch Test = http://p.p/user-manual/startup.html
866 # Fetch Test = http://p.p/user-manual/templates.html
868 # Fetch Test = http://p.p/user-manual/whatsnew.html
872 # Method Test = OPTIONS
879 # Method Test = DELETE
880 # Method Test = OPTIONS
881 # Method Test = TRACE
882 # Method Test = CONNECT
883 # Method Test = PROPFIND
884 # Method Test = PROPPATCH
887 # Method Test = MKCOL
889 # Method Test = UNLOCK
890 # Method Test = BCOPY
891 # Method Test = BMOVE
892 # Method Test = BDELETE
893 # Method Test = BPROPFIND
894 # Method Test = BPROPPATCH
895 # Method Test = SUBSCRIBE
896 # Method Test = UNSUBSCRIBE
897 # Method Test = NOTIFY
899 # Method Test = VERSION-CONTROL
900 # Method Test = REPORT
901 # Method Test = CHECKOUT
902 # Method Test = CHECKIN
903 # Method Test = UNCHECKOUT
904 # Method Test = MKWORKSPACE
905 # Method Test = UPDATE
906 # Method Test = LABEL
907 # Method Test = MERGE
908 # Method Test = BASELINE-CONTROL
909 # Method Test = MKACTIVITY
910 # Method Test = PATCH
911 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
912 # Expect Status Code = 400
914 {+block{Forbidden Port. You are not supposed to see this.}}
915 config.privoxy.org:1-/
919 config.privoxy.org:3,79-81/
922 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
923 # 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
924 # Expect Status Code = 503
925 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/
927 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
928 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
929 # Expect Status Code = 503
930 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
932 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
933 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
934 # Expect Status Code = 503
935 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
937 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
938 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
939 # Expect Status Code = 503
940 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
942 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
943 # This one currently triggers the same error condition as the
944 # test above (socks5 server unreachable), but once Privoxy
945 # starts to properly reject invalid ports it should become useful.
947 # Fetch Test = http://invalid-forward5-gateway-port.example
948 # Expect Status Code = 503
949 invalid-forward5-gateway-port.example
951 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
952 # Fetch Test = http://forward5-null-gateway-host.example
953 # Expect Status Code = 503
954 forward5-null-gateway-host.example
956 {+limit-connect{443}}
957 # Fetch Test = http://www.forbidden-connect.example:444/
959 # Expect Status Code = 403
960 www.forbidden-connect.example/
962 {+block{This request failed to make it to the target destination which means the test succeeded.}}
963 # Fetch Test = http://www.blocked-request.example/blocked-request
964 # Expect Status Code = 403
965 www.blocked-request.example/blocked-request
968 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
969 # Expect Status Code = 403
970 www.blocked-request.example/blocked-request-with-no-reason-specified
972 # Some domain pattern tests
974 {+block{domain pattern test}}
975 # Blocked URL = http://domain-pattern-test.example/
976 # Blocked URL = http://domain-pattern-test.example.org/
977 domain-pattern-test.example.
979 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
980 # Blocked URL = http://trailing-dot.example.org./
981 # Blocked URL = http://trailing-dot.example.org./foo
982 trailing-dot.example.org
985 # Just in case there is no white-space fuzzer in the house ...
987 # Set Header = X-LWS-Test: no superfluous white space here
988 # Expect Header = NO CHANGE
989 # Set Header = X-LWS-Test: superfluous white space in the house
990 # Expect Header = X-LWS-Test: superfluous white space in the house
991 # Set Header = X-LWS-Test : superfluous white space in the house
992 # Expect Header = X-LWS-Test: superfluous white space in the house
993 # Set Header = X-LWS-Test: :superfluous white space in the house
994 # Expect Header = X-LWS-Test: :superfluous white space in the house
995 # Set Header = X-LWS-Test: :no superfluous white space here
996 # Expect Header = NO CHANGE
997 # Set Header = X-LWS-Test: superfluous white tabs in the house
998 # Expect Header = X-LWS-Test: superfluous white tabs in the house
999 # Set Header = X-LWS-Test : superfluous white tabs in the house
1000 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1001 # Set Header = X-LWS-Test: "leave quoted lws alone"
1002 # Expect Header = X-LWS-Test: "leave quoted lws alone"
1003 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
1004 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
1005 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1006 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1007 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1008 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1009 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1010 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1013 {+fast-redirects{check-decoded-url}}
1014 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
1015 # Redirect Destination = http://redirected1.example.net/
1016 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F¶meter=not-part-of-the-redirected-url
1017 # Redirect Destination = http://redirected2.example.net/
1018 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F¶meter=not-part-of-the-redirected-url
1019 # Redirect Destination = http://redirected3.example.net/
1020 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
1021 # Redirect Destination = http://redirected4.example.net/¶meter=part-of-the-redirected-url
1022 # 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
1023 # Redirect Destination = http://redirected5.example.net/¶meter2=part-of-the-redirected-url2
1024 # 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
1025 # Redirect Destination = http://redirected6.example.net/¶meter2=part-of-the-redirected-url2
1026 # 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
1027 # Redirect Destination = http://redirected7.example.net/¶meter1=part-of-the-redirected-url1
1028 # 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
1029 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1030 # 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
1031 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1032 # 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
1033 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1034 # 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
1035 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1036 redirect.example.net/
1037 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
1038 # Redirect Destination = http://redirect2.example.net/
1039 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
1040 # Redirect Destination = http://redirect2.example.net/
1041 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
1042 # Redirect Destination = http://redirect2.example.net/
1043 # These tests verify that Privoxy behaves as intended,
1044 # given that the encoded redirect URLs are invalid,
1045 # there are no correct redirect URLs.
1046 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
1047 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
1048 # 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%%
1049 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
1051 {+fast-redirects{simple-check}}
1052 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1053 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1054 redirect2.example.net/