1 #############################################################################
2 # $Id: regression-tests.action,v 1.63 2016/09/19 14:16:22 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-2016 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
50 # Level 24 needs = feature status FEATURE_CLIENT_TAGS Yes
52 #######################################################
53 # Enable taggers to activate the tests on demand
54 # and suppress hiding the User-Agent for
55 # Privoxy-Regression-Test to save log space.
56 #######################################################
58 +client-header-tagger{user-agent} \
59 +client-header-tagger{privoxy-control} \
60 +client-header-filter{privoxy-control} \
67 TAG:^User-Agent: Privoxy-Regression-Test
69 #######################################################
70 # Test accept-language{}.
71 #######################################################
73 {+hide-accept-language{en-gb}}
74 # Set Header = Accept-Language: de-de
75 # Expect Header = Accept-Language: en-gb
76 TAG:^hide-accept-language\{en-gb\}$
78 {+hide-accept-language{block}}
79 # Set Header = Accept-Language: de-de
80 # Expect Header = REMOVAL
81 TAG:^hide-accept-language\{block\}$
83 #######################################################
84 # Sections for hide-referrer{} to test:
86 # 1) conditional-block
87 # 2) conditional-forge
90 # 5) a parameter that looks like a valid fake referrer
91 # 6) a parameter that looks like an invalid fake referrer
92 #######################################################
94 {+hide-referrer{conditional-block}}
95 # Set Header = Referer: http://www.example.org/foo
96 # Expect Header = REMOVAL
98 # Set Header = Referer: http://p.p/foo
99 # Expect Header = NO CHANGE
101 # Set Header = Referer: p.p/
102 # Expect Header = REMOVAL
104 # Set Header = Referer: p
105 # Expect Header = REMOVAL
107 # Set Header = Referer: http://
108 # Expect Header = REMOVAL
110 # Set Header = Referer: https://p.p/
111 # Expect Header = REMOVAL
112 TAG:^hide-referrer\{conditional-block\}$
114 {+hide-referrer{conditional-forge}}
115 # Set Header = Referer: http://www.example.org/foo
116 # Expect Header = Referer: http://p.p/
118 # Set Header = Referer: http://p.p/foo
119 # Expect Header = NO CHANGE
121 # Set Header = Referer: p.p/
122 # Expect Header = Referer: http://p.p/
124 # Set Header = Referer: p
125 # Expect Header = Referer: http://p.p/
127 # Set Header = Referer: http://
128 # Expect Header = Referer: http://p.p/
130 # Set Header = Referer: https://p.p/
131 # Expect Header = Referer: http://p.p/
132 TAG:^hide-referrer\{conditional-forge\}$
134 {+hide-referrer{forge}}
135 # Set Header = Referer: http://www.example.org/foo
136 # Expect Header = Referer: http://p.p/
137 TAG:^hide-referrer\{forge\}$
139 {+hide-referrer{block}}
140 # Set Header = Referer: http://www.example.org/foo
141 # Expect Header = REMOVAL
142 TAG:^hide-referrer\{block\}$
144 {+hide-referrer{invalid}}
145 # Set Header = Referer: http://www.example.org/foo
146 # Expect Header = Referer: invalid
147 TAG:^hide-referrer\{invalid\}$
149 {+hide-referrer{http://www.privoxy.org/}}
150 # Set Header = Referer: http://www.example.org/asdf
151 # Expect Header = Referer: http://www.privoxy.org/
152 TAG:^hide-referrer\{http://www.privoxy.org/\}$
155 #TAG:^hide-referrer\{\}$
157 #######################################################
158 # Test hide-user-agent{}.
159 #######################################################
161 {+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD alpha; en-GB; rv:1.8.1.6) Gecko/20070913 Firefox/2.0.0.6}}
162 # 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
163 # 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
164 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\}$
166 {+hide-user-agent{block}}
167 # XXX: Check the code that is tested here.
168 # Set Header = ua-blah: blah
169 # Expect Header = REMOVAL
170 TAG:^hide-user-agent{block}$
173 # Set Header = ua-blah: blah
174 # Expect Header = NO CHANGE
175 TAG:^-hide-user-agent{block}$
178 #######################################################
180 #######################################################
182 {+add-header{X-Custom-Header: yes, please}}
183 # Set Header = X-Whatever: foo
184 # Expect Header = X-Custom-Header: yes, please
185 TAG:^add-header\{X-Custom-Header: yes, please\}$
187 #######################################################
188 # Test client-header-filter{hide-tor-exit-notation}.
189 #######################################################
191 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
192 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/
193 # Expect Header = Referer: http://p.p/
195 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
196 # Expect Header = Referer: http://p.p/foo/bar/baaz/
198 # Set Header = Referer: http://p.p/
199 # Expect Header = NO CHANGE
201 # Set Header = Referer: http://config.privoxy.org.zwiebelsuppe.exit/foo/bar/baaz.html
202 # Expect Header = Referer: http://config.privoxy.org/foo/bar/baaz.html
204 # Set Header = Host: p.p.zwiebelsuppe.exit
205 # Expect Header = Host: p.p
207 # Set Header = Host: p.p
208 # Expect Header = NO CHANGE
210 # Set Header = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
211 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
212 TAG:^client-header-filter\{hide-tor-exit-notation\}$
214 #######################################################
215 # Test crunch-client-header{}.
216 #######################################################
218 {+crunch-client-header{text/html}}
219 # Set Header = Content-Type: text/html
220 # Expect Header = REMOVAL
222 # Set Header = Content-Type: text/html; charset=4711
223 # Expect Header = REMOVAL
225 # Set Header = Content-Type: text/plain
226 # Expect Header = NO CHANGE
227 TAG:^crunch-client-header\{text/plain\}$
229 #######################################################
230 # Test crunch-if-none-match.
231 #######################################################
233 {+crunch-if-none-match -hide-if-modified-since}
234 # Set Header = If-None-Match: 8987afd239d2093kd2309kd
235 # Expect Header = REMOVAL
237 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
238 # Expect Header = REMOVAL
240 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
241 # Expect Header = NO CHANGE
242 TAG:^crunch-if-none-match$
244 #######################################################
245 # Test hide-if-modified-since
246 #######################################################
248 {+hide-if-modified-since{block} -crunch-if-none-match}
249 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
250 # Expect Header = REMOVAL
252 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
253 # Expect Header = NO CHANGE
254 TAG:^hide-if-modified-since\{block\}$
256 {+hide-if-modified-since{-60} -crunch-if-none-match}
257 # Set Header = If-Modified-Since: Gee, this date is invalid
258 # Expect Header = REMOVAL
260 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
261 # Expect Header = SOME CHANGE
262 # Set Header = If-Modified-Since: Thu, 04-Oct-07 09:56:35 GMT
263 # Expect Header = SOME CHANGE
264 # Set Header = If-Modified-Since: Thursday, 04-Oct-2007 09:56:35 GMT
265 # Expect Header = SOME CHANGE
266 # Set Header = If-Modified-Since: Thu, 04-Oct-2007 09:56:35 GMT
267 # Expect Header = SOME CHANGE
268 # Set Header = If-Modified-Since: Thursday Oct 04 09:56:35 2007 GMT
269 # Expect Header = SOME CHANGE
271 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
272 # Expect Header = SOME CHANGE
274 # Set Header = If-Modified-Since: Thu, 01-Jan-70 00:00:00 GMT
275 # Expect Header = SOME CHANGE
277 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 00:00:00 GMT
278 # Expect Header = SOME CHANGE
280 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 00:00:00 GMT
281 # Expect Header = SOME CHANGE
283 # Set Header = If-Modified-Since: Thursday Jan 01 00:00:00 1970 GMT
284 # Expect Header = SOME CHANGE
287 # Set Header = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
288 # Expect Header = REMOVAL
289 # Set Header = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
290 # Expect Header = REMOVAL
291 # Set Header = If-Modified-Since: Thursday, 01-Jan-123456789 00:00:00 GMT
292 # Expect Header = REMOVAL
293 # Set Header = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
294 # Expect Header = REMOVAL
295 # Set Header = If-Modified-Since: Thursday Jan 01 00:00:00 123456789 GMT
296 # Expect Header = REMOVAL
298 # Set Header = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
299 # Expect Header = SOME CHANGE
301 # Set Header = If-Modified-Since: Mon, 01-Jan-25 00:00:00 GMT
302 # Expect Header = SOME CHANGE
304 # Set Header = If-Modified-Since: Monday, 01-Jan-2525 00:00:00 GMT
305 # Expect Header = SOME CHANGE
307 # Set Header = If-Modified-Since: Mon, 01-Jan-2525 00:00:00 GMT
308 # Expect Header = SOME CHANGE
310 # Set Header = If-Modified-Since: Monday Jan 01 00:00:00 2525 GMT
311 # Expect Header = SOME CHANGE
314 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
315 # Expect Header = SOME CHANGE
316 # Set Header = If-Modified-Since: Thu, 01-Jan-70 02:00:00 GMT
317 # Expect Header = SOME CHANGE
318 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 02:00:00 GMT
319 # Expect Header = SOME CHANGE
320 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 02:00:00 GMT
321 # Expect Header = SOME CHANGE
322 # Set Header = If-Modified-Since: Thursday Jan 01 02:00:00 1970 GMT
323 # Expect Header = SOME CHANGE
324 TAG:^hide-if-modified-since\{-60\}$
326 {+hide-if-modified-since{+60} -crunch-if-none-match}
327 # Set Header = If-Modified-Since: Gee, this date is invalid
328 # Expect Header = REMOVAL
329 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
330 # Expect Header = SOME CHANGE
331 # Set Header = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
332 # Expect Header = SOME CHANGE
334 TAG:^hide-if-modified-since\{\+60\}$
336 {+hide-if-modified-since{60} -crunch-if-none-match}
337 # Set Header = If-Modified-Since: Gee, this date is invalid
338 # Expect Header = REMOVAL
339 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
340 # Expect Header = SOME CHANGE
341 TAG:^hide-if-modified-since\{60\}$
343 {+hide-if-modified-since{+0} -crunch-if-none-match}
344 # Set Header = If-Modified-Since: Gee, this date is invalid
345 # Expect Header = REMOVAL
346 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
347 # Expect Header = NO CHANGE
348 TAG:^hide-if-modified-since\{\+0\}$
350 {+hide-if-modified-since{-0} -crunch-if-none-match}
351 # Set Header = If-Modified-Since: Gee, this date is invalid
352 # Expect Header = REMOVAL
353 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
354 # Expect Header = NO CHANGE
355 TAG:^hide-if-modified-since\{-0\}$
357 {+hide-if-modified-since{0} -crunch-if-none-match}
358 # Set Header = If-Modified-Since: Gee, this date is invalid
359 # Expect Header = REMOVAL
360 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
361 # Expect Header = NO CHANGE
362 TAG:^hide-if-modified-since\{0\}$
364 {+hide-if-modified-since{NaN} -crunch-if-none-match}
365 # Set Header = If-Modified-Since: Gee, this date is invalid
366 # Expect Header = REMOVAL
367 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
368 # Expect Header = NO CHANGE
369 TAG:^hide-if-modified-since\{NaN\}$
372 #######################################################
373 # Test crunch-outgoing-cookies
374 #######################################################
377 +crunch-outgoing-cookies \
378 -crunch-incoming-cookies \
379 -limit-cookie-lifetime \
380 -session-cookies-only \
381 -hide-if-modified-since \
383 # Set Header = If-Modified-Since: Gee, this date is invalid
384 # Expect Header = NO CHANGE
386 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
387 # Expect Header = REMOVAL
388 TAG:^crunch-outgoing-cookies$
390 #######################################################
391 # Test session-cookies-only
393 # XXX: pretty useless as session-cookies-only doesn't
394 # affect client headers.
395 #######################################################
398 -crunch-outgoing-cookies \
399 -crunch-incoming-cookies \
400 -limit-cookie-lifetime \
401 +session-cookies-only \
402 -hide-if-modified-since \
404 # Set Header = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
405 # Expect Header = NO CHANGE
407 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
408 # Expect Header = NO CHANGE
409 TAG:^session-cookies-only$
411 #######################################################
412 # Test change-x-forwarded-for
413 #######################################################
416 -change-x-forwarded-for \
418 # Set Header = X-Forwarded-For: 10.0.0.1
419 # Expect Header = NO CHANGE
420 TAG:^-change-x-forwarded-for$
423 +change-x-forwarded-for{block} \
425 # Set Header = X-Forwarded-For: 10.0.0.1
426 # Expect Header = REMOVAL
427 TAG:^change-x-forwarded-for\{block\}$
430 +change-x-forwarded-for{add} \
432 # Set Header = X-Forwarded-For: 10.0.0.1
433 # Expect Header = SOME CHANGE
434 TAG:^change-x-forwarded-for\{add\}$
436 #######################################################
437 # Test hide-from-header
438 #######################################################
441 +hide-from-header{block}\
443 # Set Header = From: schneewitchen@example.org
444 # Expect Header = REMOVAL
445 TAG:^hide-from-header\{block\}$
448 +hide-from-header{siebenzwerge@example.org}\
450 # Set Header = From: schneewitchen@example.org
451 # Expect Header = From: siebenzwerge@example.org
452 TAG:^hide-from-header\{siebenzwerge@example.org\}$
454 #######################################################
455 # Test prevent-compression
456 #######################################################
459 +prevent-compression\
461 # Set Header = Accept-Encoding: gzip, deflate
462 # Expect Header = REMOVAL
464 # Set Header = Accept-Encoding: gzip
465 # Expect Header = REMOVAL
467 # Set Header = Accept-Encoding: deflate
468 # Expect Header = REMOVAL
469 TAG:^prevent-compression$
471 #######################################################
472 # Test content filters which could cause problems with
474 #######################################################
477 -client-header-tagger{range-requests} \
478 +deanimate-gifs{last} \
481 # Set Header = Range: bytes=1234-5678
482 # Expect Header = REMOVAL
483 # Set Header = Range: bytes=1-5
484 # Expect Header = REMOVAL
485 # Set Header = If-Range: bytes=1234-5678
486 # Expect Header = REMOVAL
487 # Set Header = Request-Range: bytes=1234-5678
488 # Expect Header = REMOVAL
489 # Set Header = Range: foo
490 # Expect Header = REMOVAL
491 # Set Header = If-Range: foo
492 # Expect Header = REMOVAL
493 # Set Header = Request-Range: foo
494 # Expect Header = REMOVAL
495 # Set Header = Range: bytes=0-5678
496 # Expect Header = NO CHANGE
497 # Set Header = Range: bytes=0-
498 # Expect Header = NO CHANGE
499 # Set Header = If-Range: bytes=0-5678
500 # Expect Header = NO CHANGE
501 # Set Header = If-Range: bytes=0-
502 # Expect Header = NO CHANGE
503 # Set Header = Request-Range: bytes=0-5678
504 # Expect Header = NO CHANGE
505 # Set Header = Request-Range: bytes=0-
506 # Expect Header = NO CHANGE
507 TAG:^deanimate-gifs\{last\}$
510 -client-header-tagger{range-requests} \
512 +filter{banners-by-size} \
514 # Set Header = Range: bytes=1234-5678
515 # Expect Header = REMOVAL
516 # Set Header = Range: bytes=1-5
517 # Expect Header = REMOVAL
518 # Set Header = If-Range: bytes=1234-5678
519 # Expect Header = REMOVAL
520 # Set Header = Request-Range: bytes=1234-5678
521 # Expect Header = REMOVAL
522 # Set Header = Range: bytes=1-5
523 # Expect Header = REMOVAL
524 # Set Header = If-Range: bytes=1234-5678
525 # Expect Header = REMOVAL
526 # Set Header = Request-Range: bytes=1234-5678
527 # Expect Header = REMOVAL
528 # Set Header = Range: foo
529 # Expect Header = REMOVAL
530 # Set Header = If-Range: foo
531 # Expect Header = REMOVAL
532 # Set Header = Request-Range: foo
533 # Expect Header = REMOVAL
534 # Set Header = Range: bytes=0-5678
535 # Expect Header = NO CHANGE
536 # Set Header = Range: bytes=0-
537 # Expect Header = NO CHANGE
538 # Set Header = If-Range: bytes=0-5678
539 # Expect Header = NO CHANGE
540 # Set Header = If-Range: bytes=0-
541 # Expect Header = NO CHANGE
542 # Set Header = Request-Range: bytes=0-5678
543 # Expect Header = NO CHANGE
544 # Set Header = Request-Range: bytes=0-
545 # Expect Header = NO CHANGE
546 TAG:^filter\{banners-by-size\}$
549 -client-header-tagger{range-requests} \
553 # Set Header = Range: bytes=1234-5678
554 # Expect Header = NO CHANGE
555 # Set Header = If-Range: bytes=1234-5678
556 # Expect Header = NO CHANGE
557 # Set Header = Request-Range: bytes=1234-5678
558 # Expect Header = NO CHANGE
559 TAG:^no-content-filter$
562 # Set Header = Connection: keep-alive
563 # Expect Header = NO CHANGE
565 # Set Header = Connection:
566 # Expect Header = REMOVAL
568 TAG:^Connection: keep-alive$
571 # Set Header = Connection: keep-alive
572 # Expect Header = Connection: close
574 # Set Header = Connection:
575 # Expect Header = Connection: close
577 TAG:^Connection: close$
580 # Set Header = Connection: close
581 # Expect Header = NO CHANGE
583 TAG:^connection-sharing disabled$
586 # Set Header = Connection: close
587 # Expect Header = REMOVAL
589 # Set Header = Connection: keep-alive
590 # Expect Header = NO CHANGE
592 TAG:^connection-sharing enabled$
595 # XXX: Removing a header by not specifying a value is
596 # an inherited curl feature and could be viewed as a
597 # bug as far as Privoxy-Regression-Test is concerned.
600 # Expect Header = Host: p.p
604 # Set Header = Host: whatever.example.org
605 # Expect Header = NO CHANGE
606 TAG:^Host header other than the target host$
609 # Set Header = Keep-Alive: 20
610 # Expect Header = NO CHANGE
612 # Set Header = Keep-Alive: timeout=20, max=3
613 # Expect Header = NO CHANGE
615 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
616 # Expect Header = NO CHANGE
618 # Set Header = Keep-Alive: timeuot=20, max=3
619 # Expect Header = REMOVAL
621 # Set Header = Keep-Alive: twenty seconds please
622 # Expect Header = REMOVAL
624 TAG:^Parse Keep-Alive header$
627 # Set Header = Keep-Alive: 20
628 # Expect Header = REMOVAL
630 # Set Header = Keep-Alive: timeout=20, max=3
631 # Expect Header = REMOVAL
633 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
634 # Expect Header = REMOVAL
636 TAG:^Keep-Alive header removal$
639 # XXX: check the RFC to use a real value
640 # Set Header = proxy-connection: keep-alive
641 # Expect Header = REMOVAL
642 TAG:^Proxy-Connection removal$
645 # Set Header = Proxy-Connection: keep-alive
646 # Expect Header = REMOVAL
647 TAG:^Proxy-Connection removal$
650 # These are somewhat redundant when testing with
651 # GET requests, but I want to remember then when
652 # TRACE requests are supported.
654 # Set Header = Max-Forwards: 0
655 # Expect Header = NO CHANGE
656 # Set Header = Max-Forwards: 1
657 # Expect Header = NO CHANGE
658 # Set Header = Max-Forwards: -1
659 # Expect Header = NO CHANGE
660 # Set Header = Max-Forwards: 3
661 # Expect Header = NO CHANGE
662 TAG:^Max-Forwards header without TRACE method$
665 # Set Header = Proxy-Authorization: blafaseldieda
666 # Expect Header = REMOVAL
668 TAG:^Proxy-Authorization header removal$
671 # Set Header = Proxy-Authorization: blafaseldieda
672 # Expect Header = Proxy-Authorization: blafaseldieda
674 TAG:^Proxy-Authorization header forwarding$
676 ################################################################
678 # Fairly dumb tests for Privoxy CGI pages.
680 # These are mainly useful for checking for memory leaks
681 # with Valgrind or whether or not the user manual is installed
684 # Note that if "Expect Status Code" is missing, 200 is implied.
686 ################################################################
688 # Fetch Test = http://p.p/
689 # Fetch Test = http://p.p/die
690 # Expect Status Code = 404
692 # Fetch Test = http://p.p/die
693 # Expect Status Code = 200
695 # Fetch Test = http://p.p/show-status
696 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
697 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
698 # XXX: for the invalid ones we probably shouldn't return status code 200.
699 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
700 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
701 # Fetch Test = http://config.privoxy.org/show-status?file=actions
702 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
703 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
704 # Fetch Test = http://config.privoxy.org/show-status?file=filter
705 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
706 # Fetch Test = http://config.privoxy.org/show-status?file=trust
707 # Fetch Test = http://p.p/show-version
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 = 404
725 # Fetch Test = http://p.p/edit-actions
727 # Fetch Test = http://p.p/eaa
729 # Fetch Test = http://p.p/eau
731 # Fetch Test = http://p.p/ear
733 # Fetch Test = http://p.p/eal
735 # Fetch Test = http://p.p/eafu
737 # Fetch Test = http://p.p/eas
739 # Fetch Test = http://p.p/easa
741 # Fetch Test = http://p.p/easr
743 # Fetch Test = http://p.p/eass
745 # Fetch Test = http://p.p/edit-actions-for-url
747 # Fetch Test = http://p.p/edit-actions-list
749 # Fetch Test = http://p.p/edit-actions-submit
751 # Fetch Test = http://p.p/edit-actions-url
753 # Fetch Test = http://p.p/edit-actions-url-form
755 # Fetch Test = http://p.p/edit-actions-add-url
757 # Fetch Test = http://p.p/edit-actions-add-url-form
759 # Fetch Test = http://p.p/edit-actions-remove-url
761 # Fetch Test = http://p.p/edit-actions-remove-url-form
763 # Fetch Test = http://p.p/edit-actions-section-add
765 # Fetch Test = http://p.p/edit-actions-section-remove
767 # Fetch Test = http://p.p/edit-actions-section-swap
769 # Fetch Test = http://p.p/error-favicon.ico
770 # Fetch Test = http://p.p/favicon.ico
771 # Fetch Test = http://p.p/robots.txt
772 # Fetch Test = http://p.p/send-banner
773 # Fetch Test = http://p.p/send-stylesheet
774 # Fetch Test = http://p.p/t
775 # Fetch Test = http://p.p/url-info-osd.xml
776 # Trusted CGI Request = http://p.p/client-tags
779 # Trusted CGI Request = http://p.p/edit-actions
780 # Expect Status Code = 302
781 # Level = 12 # Depends on the CGI editor being enabled
782 # Fetch Test = http://p.p/does-not-exist
783 # Expect Status Code = 404
784 # Trusted CGI Request = http://p.p/eaa
786 # Trusted CGI Request = http://p.p/eau
788 # Trusted CGI Request = http://p.p/ear
790 # Trusted CGI Request = http://p.p/eal
792 # Trusted CGI Request = http://p.p/eafu
794 # Trusted CGI Request = http://p.p/eas
796 # Trusted CGI Request = http://p.p/easa
798 # Trusted CGI Request = http://p.p/easr
800 # Trusted CGI Request = http://p.p/eass
802 # Trusted CGI Request = http://p.p/edit-actions-for-url
804 # Trusted CGI Request = http://p.p/edit-actions-list
806 # Trusted CGI Request = http://p.p/edit-actions-submit
808 # Trusted CGI Request = http://p.p/edit-actions-url
810 # Trusted CGI Request = http://p.p/edit-actions-url-form
812 # Trusted CGI Request = http://p.p/edit-actions-add-url
814 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
816 # Trusted CGI Request = http://p.p/edit-actions-remove-url
818 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
820 # Trusted CGI Request = http://p.p/edit-actions-section-add
822 # Trusted CGI Request = http://p.p/edit-actions-section-remove
824 # Trusted CGI Request = http://p.p/edit-actions-section-swap
826 # Trusted CGI Request = http://p.p/send-stylesheet
828 # The following tests depend on Privoxy being configured to deliver the user manual
830 # Fetch Test = http://p.p/user-manual
831 # Expect Status Code = 302
833 # Fetch Test = http://p.p/user-manual/
835 # Fetch Test = http://p.p/user-manual/actions-file.html
837 # Fetch Test = http://p.p/user-manual/appendix.html
839 # Fetch Test = http://p.p/user-manual/config.html
841 # Fetch Test = http://p.p/user-manual/configuration.html
843 # Fetch Test = http://p.p/user-manual/contact.html
845 # Fetch Test = http://p.p/user-manual/copyright.html
847 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
849 # Fetch Test = http://p.p/user-manual/filter-file.html
851 # Fetch Test = http://p.p/user-manual/index.html
853 # Fetch Test = http://p.p/user-manual/installation.html
855 # Fetch Test = http://p.p/user-manual/introduction.html
857 # Fetch Test = http://p.p/user-manual/p_doc.css
859 # Fetch Test = http://p.p/user-manual/proxy2.jpg
861 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
863 # Fetch Test = http://p.p/user-manual/quickstart.html
865 # Fetch Test = http://p.p/user-manual/seealso.html
867 # Fetch Test = http://p.p/user-manual/startup.html
869 # Fetch Test = http://p.p/user-manual/templates.html
871 # Fetch Test = http://p.p/user-manual/whatsnew.html
875 # Method Test = OPTIONS
882 # Method Test = DELETE
883 # Method Test = OPTIONS
884 # Method Test = TRACE
885 # Method Test = CONNECT
886 # Method Test = PROPFIND
887 # Method Test = PROPPATCH
890 # Method Test = MKCOL
892 # Method Test = UNLOCK
893 # Method Test = BCOPY
894 # Method Test = BMOVE
895 # Method Test = BDELETE
896 # Method Test = BPROPFIND
897 # Method Test = BPROPPATCH
898 # Method Test = SUBSCRIBE
899 # Method Test = UNSUBSCRIBE
900 # Method Test = NOTIFY
902 # Method Test = VERSION-CONTROL
903 # Method Test = REPORT
904 # Method Test = CHECKOUT
905 # Method Test = CHECKIN
906 # Method Test = UNCHECKOUT
907 # Method Test = MKWORKSPACE
908 # Method Test = UPDATE
909 # Method Test = LABEL
910 # Method Test = MERGE
911 # Method Test = BASELINE-CONTROL
912 # Method Test = MKACTIVITY
913 # Method Test = PATCH
914 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
915 # Expect Status Code = 400
917 {+block{Forbidden Port. You are not supposed to see this.}}
918 config.privoxy.org:1-/
922 config.privoxy.org:3,79-81/
925 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
926 # 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
927 # Expect Status Code = 503
928 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/
930 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
931 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
932 # Expect Status Code = 503
933 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
935 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
936 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
937 # Expect Status Code = 503
938 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
940 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
941 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
942 # Expect Status Code = 503
943 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
945 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
946 # This one currently triggers the same error condition as the
947 # test above (socks5 server unreachable), but once Privoxy
948 # starts to properly reject invalid ports it should become useful.
950 # Fetch Test = http://invalid-forward5-gateway-port.example
951 # Expect Status Code = 503
952 invalid-forward5-gateway-port.example
954 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
955 # Fetch Test = http://forward5-null-gateway-host.example
956 # Expect Status Code = 503
957 forward5-null-gateway-host.example
959 {+limit-connect{443}}
960 # Fetch Test = http://www.forbidden-connect.example:444/
962 # Expect Status Code = 403
963 www.forbidden-connect.example/
965 {+block{This request failed to make it to the target destination which means the test succeeded.}}
966 # Fetch Test = http://www.blocked-request.example/blocked-request
967 # Expect Status Code = 403
968 www.blocked-request.example/blocked-request
971 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
972 # Expect Status Code = 403
973 www.blocked-request.example/blocked-request-with-no-reason-specified
975 # Some domain pattern tests
977 {+block{domain pattern test}}
978 # Blocked URL = http://domain-pattern-test.example/
979 # Blocked URL = http://domain-pattern-test.example.org/
980 domain-pattern-test.example.
982 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
983 # Blocked URL = http://trailing-dot.example.org./
984 # Blocked URL = http://trailing-dot.example.org./foo
985 trailing-dot.example.org
988 # Just in case there is no white-space fuzzer in the house ...
990 # Set Header = X-LWS-Test: no superfluous white space here
991 # Expect Header = NO CHANGE
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 : superfluous white space in the house
995 # Expect Header = X-LWS-Test: superfluous white space in the house
996 # Set Header = X-LWS-Test: :superfluous white space in the house
997 # Expect Header = X-LWS-Test: :superfluous white space in the house
998 # Set Header = X-LWS-Test: :no superfluous white space here
999 # Expect Header = NO CHANGE
1000 # Set Header = X-LWS-Test: superfluous white tabs in the house
1001 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1002 # Set Header = X-LWS-Test : superfluous white tabs in the house
1003 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1004 # Set Header = X-LWS-Test: "leave quoted lws alone"
1005 # Expect Header = X-LWS-Test: "leave quoted lws alone"
1006 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
1007 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
1008 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1009 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1010 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1011 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
1012 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1013 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
1016 {+fast-redirects{check-decoded-url}}
1017 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
1018 # Redirect Destination = http://redirected1.example.net/
1019 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F¶meter=not-part-of-the-redirected-url
1020 # Redirect Destination = http://redirected2.example.net/
1021 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F¶meter=not-part-of-the-redirected-url
1022 # Redirect Destination = http://redirected3.example.net/
1023 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
1024 # Redirect Destination = http://redirected4.example.net/¶meter=part-of-the-redirected-url
1025 # 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
1026 # Redirect Destination = http://redirected5.example.net/¶meter2=part-of-the-redirected-url2
1027 # 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
1028 # Redirect Destination = http://redirected6.example.net/¶meter2=part-of-the-redirected-url2
1029 # 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
1030 # Redirect Destination = http://redirected7.example.net/¶meter1=part-of-the-redirected-url1
1031 # 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
1032 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1033 # 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
1034 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1035 # 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
1036 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1037 # 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
1038 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
1039 redirect.example.net/
1040 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
1041 # Redirect Destination = http://redirect2.example.net/
1042 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
1043 # Redirect Destination = http://redirect2.example.net/
1044 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
1045 # Redirect Destination = http://redirect2.example.net/
1046 # These tests verify that Privoxy behaves as intended,
1047 # given that the encoded redirect URLs are invalid,
1048 # there are no correct redirect URLs.
1049 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
1050 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
1051 # 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%%
1052 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
1054 {+fast-redirects{simple-check}}
1055 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1056 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
1057 redirect2.example.net/