1 #############################################################################
2 # $Id: regression-tests.action,v 1.49 2013/03/07 14:09:20 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-2013 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.21
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 = config line enable-edit-actions\s+1
36 # Level 13 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
37 # Level 13 needs = config line keep-alive-timeout\s+[1-9]+
38 # Level 14 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE No
39 # Level 15 needs = config line connection-sharing\s+0
40 # Level 16 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
41 # Level 16 needs = config line connection-sharing\s+1
42 # Level 17 needs = feature status FEATURE_PTHREAD Yes
43 # Level 18 needs = feature status FEATURE_GRACEFUL_TERMINATION No
44 # Level 19 needs = feature status FEATURE_GRACEFUL_TERMINATION Yes
45 # Level 20 needs = feature status FEATURE_TOGGLE Yes
46 # Level 21 needs = feature status FEATURE_TOGGLE No
47 # Level 22 needs = config line enable-proxy-authentication-forwarding\s+0
48 # Level 23 needs = config line enable-proxy-authentication-forwarding\s+1
50 #######################################################
51 # Enable taggers to activate the tests on demand
52 # and suppress hiding the User-Agent for
53 # Privoxy-Regression-Test to save log space.
54 #######################################################
56 +client-header-tagger{user-agent} \
57 +client-header-tagger{privoxy-control} \
58 +client-header-filter{privoxy-control} \
65 TAG:^User-Agent: Privoxy-Regression-Test
67 #######################################################
68 # Test accept-language{}.
69 #######################################################
71 {+hide-accept-language{en-gb}}
72 # Set Header = Accept-Language: de-de
73 # Expect Header = Accept-Language: en-gb
74 TAG:^hide-accept-language\{en-gb\}$
76 {+hide-accept-language{block}}
77 # Set Header = Accept-Language: de-de
78 # Expect Header = REMOVAL
79 TAG:^hide-accept-language\{block\}$
81 #######################################################
82 # Sections for hide-referrer{} to test:
84 # 1) conditional-block
85 # 2) conditional-forge
88 # 5) a parameter that looks like a valid fake referrer
89 # 6) a parameter that looks like an invalid fake referrer
90 #######################################################
92 {+hide-referrer{conditional-block}}
93 # Set Header = Referer: http://www.example.org/foo
94 # Expect Header = REMOVAL
96 # Set Header = Referer: http://p.p/foo
97 # Expect Header = NO CHANGE
99 # Set Header = Referer: p.p/
100 # Expect Header = REMOVAL
102 # Set Header = Referer: p
103 # Expect Header = REMOVAL
105 # Set Header = Referer: http://
106 # Expect Header = REMOVAL
108 # Set Header = Referer: https://p.p/
109 # Expect Header = REMOVAL
110 TAG:^hide-referrer\{conditional-block\}$
112 {+hide-referrer{conditional-forge}}
113 # Set Header = Referer: http://www.example.org/foo
114 # Expect Header = Referer: http://p.p/
116 # Set Header = Referer: http://p.p/foo
117 # Expect Header = NO CHANGE
119 # Set Header = Referer: p.p/
120 # Expect Header = Referer: http://p.p/
122 # Set Header = Referer: p
123 # Expect Header = Referer: http://p.p/
125 # Set Header = Referer: http://
126 # Expect Header = Referer: http://p.p/
128 # Set Header = Referer: https://p.p/
129 # Expect Header = Referer: http://p.p/
130 TAG:^hide-referrer\{conditional-forge\}$
132 {+hide-referrer{forge}}
133 # Set Header = Referer: http://www.example.org/foo
134 # Expect Header = Referer: http://p.p/
135 TAG:^hide-referrer\{forge\}$
137 {+hide-referrer{block}}
138 # Set Header = Referer: http://www.example.org/foo
139 # Expect Header = REMOVAL
140 TAG:^hide-referrer\{block\}$
142 {+hide-referrer{invalid}}
143 # Set Header = Referer: http://www.example.org/foo
144 # Expect Header = Referer: invalid
145 TAG:^hide-referrer\{invalid\}$
147 {+hide-referrer{http://www.privoxy.org/}}
148 # Set Header = Referer: http://www.example.org/asdf
149 # Expect Header = Referer: http://www.privoxy.org/
150 TAG:^hide-referrer\{http://www.privoxy.org/\}$
153 #TAG:^hide-referrer\{\}$
155 #######################################################
156 # Test hide-user-agent{}.
157 #######################################################
159 {+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD alpha; en-GB; rv:1.8.1.6) Gecko/20070913 Firefox/2.0.0.6}}
160 # 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
161 # 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
162 TAG:^hide-user-agent\{Mozilla/5\.0 \(X11; U; FreeBSD alpha; en-GB; rv:1\.8\.1\.6\) Gecko/20070913 Firefox/2\.0\.0\.6\}$
164 {+hide-user-agent{block}}
165 # XXX: Check the code that is tested here.
166 # Set Header = ua-blah: blah
167 # Expect Header = REMOVAL
168 TAG:^hide-user-agent{block}$
171 # Set Header = ua-blah: blah
172 # Expect Header = NO CHANGE
173 TAG:^-hide-user-agent{block}$
176 #######################################################
178 #######################################################
180 {+add-header{X-Custom-Header: yes, please}}
181 # Set Header = X-Whatever: foo
182 # Expect Header = X-Custom-Header: yes, please
183 TAG:^add-header\{X-Custom-Header: yes, please\}$
185 #######################################################
186 # Test client-header-filter{hide-tor-exit-notation}.
187 #######################################################
189 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
190 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/
191 # Expect Header = Referer: http://p.p/
193 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
194 # Expect Header = Referer: http://p.p/foo/bar/baaz/
196 # Set Header = Referer: http://p.p/
197 # Expect Header = NO CHANGE
199 # Set Header = Referer: http://config.privoxy.org.zwiebelsuppe.exit/foo/bar/baaz.html
200 # Expect Header = Referer: http://config.privoxy.org/foo/bar/baaz.html
202 # Set Header = Host: p.p.zwiebelsuppe.exit
203 # Expect Header = Host: p.p
205 # Set Header = Host: p.p
206 # Expect Header = NO CHANGE
208 # Set Header = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
209 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
210 TAG:^client-header-filter\{hide-tor-exit-notation\}$
212 #######################################################
213 # Test crunch-client-header{}.
214 #######################################################
216 {+crunch-client-header{text/html}}
217 # Set Header = Content-Type: text/html
218 # Expect Header = REMOVAL
220 # Set Header = Content-Type: text/html; charset=4711
221 # Expect Header = REMOVAL
223 # Set Header = Content-Type: text/plain
224 # Expect Header = NO CHANGE
225 TAG:^crunch-client-header\{text/plain\}$
227 #######################################################
228 # Test crunch-if-none-match.
229 #######################################################
231 {+crunch-if-none-match -hide-if-modified-since}
232 # Set Header = If-None-Match: 8987afd239d2093kd2309kd
233 # Expect Header = REMOVAL
235 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
236 # Expect Header = REMOVAL
238 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
239 # Expect Header = NO CHANGE
240 TAG:^crunch-if-none-match$
242 #######################################################
243 # Test hide-if-modified-since
244 #######################################################
246 {+hide-if-modified-since{block} -crunch-if-none-match}
247 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
248 # Expect Header = REMOVAL
250 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
251 # Expect Header = NO CHANGE
252 TAG:^hide-if-modified-since\{block\}$
254 {+hide-if-modified-since{-60} -crunch-if-none-match}
255 # Set Header = If-Modified-Since: Gee, this date is invalid
256 # Expect Header = REMOVAL
258 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
259 # Expect Header = SOME CHANGE
260 # Set Header = If-Modified-Since: Thu, 04-Oct-07 09:56:35 GMT
261 # Expect Header = SOME CHANGE
262 # Set Header = If-Modified-Since: Thursday, 04-Oct-2007 09:56:35 GMT
263 # Expect Header = SOME CHANGE
264 # Set Header = If-Modified-Since: Thu, 04-Oct-2007 09:56:35 GMT
265 # Expect Header = SOME CHANGE
266 # Set Header = If-Modified-Since: Thursday Oct 04 09:56:35 2007 GMT
267 # Expect Header = SOME CHANGE
269 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
270 # Expect Header = SOME CHANGE
272 # Set Header = If-Modified-Since: Thu, 01-Jan-70 00:00:00 GMT
273 # Expect Header = SOME CHANGE
275 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 00:00:00 GMT
276 # Expect Header = SOME CHANGE
278 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 00:00:00 GMT
279 # Expect Header = SOME CHANGE
281 # Set Header = If-Modified-Since: Thursday Jan 01 00:00:00 1970 GMT
282 # Expect Header = SOME CHANGE
285 # Set Header = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
286 # Expect Header = REMOVAL
287 # Set Header = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
288 # Expect Header = REMOVAL
289 # Set Header = If-Modified-Since: Thursday, 01-Jan-123456789 00:00:00 GMT
290 # Expect Header = REMOVAL
291 # Set Header = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
292 # Expect Header = REMOVAL
293 # Set Header = If-Modified-Since: Thursday Jan 01 00:00:00 123456789 GMT
294 # Expect Header = REMOVAL
296 # Set Header = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
297 # Expect Header = SOME CHANGE
299 # Set Header = If-Modified-Since: Mon, 01-Jan-25 00:00:00 GMT
300 # Expect Header = SOME CHANGE
302 # Set Header = If-Modified-Since: Monday, 01-Jan-2525 00:00:00 GMT
303 # Expect Header = SOME CHANGE
305 # Set Header = If-Modified-Since: Mon, 01-Jan-2525 00:00:00 GMT
306 # Expect Header = SOME CHANGE
308 # Set Header = If-Modified-Since: Monday Jan 01 00:00:00 2525 GMT
309 # Expect Header = SOME CHANGE
312 # Set Header = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
313 # Expect Header = SOME CHANGE
314 # Set Header = If-Modified-Since: Thu, 01-Jan-70 02:00:00 GMT
315 # Expect Header = SOME CHANGE
316 # Set Header = If-Modified-Since: Thursday, 01-Jan-1970 02:00:00 GMT
317 # Expect Header = SOME CHANGE
318 # Set Header = If-Modified-Since: Thu, 01-Jan-1970 02:00:00 GMT
319 # Expect Header = SOME CHANGE
320 # Set Header = If-Modified-Since: Thursday Jan 01 02:00:00 1970 GMT
321 # Expect Header = SOME CHANGE
322 TAG:^hide-if-modified-since\{-60\}$
324 {+hide-if-modified-since{+60} -crunch-if-none-match}
325 # Set Header = If-Modified-Since: Gee, this date is invalid
326 # Expect Header = REMOVAL
327 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
328 # Expect Header = SOME CHANGE
329 # Set Header = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
330 # Expect Header = SOME CHANGE
331 TAG:^hide-if-modified-since\{\+60\}$
333 {+hide-if-modified-since{60} -crunch-if-none-match}
334 # Set Header = If-Modified-Since: Gee, this date is invalid
335 # Expect Header = REMOVAL
336 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
337 # Expect Header = SOME CHANGE
338 TAG:^hide-if-modified-since\{60\}$
340 {+hide-if-modified-since{+0} -crunch-if-none-match}
341 # Set Header = If-Modified-Since: Gee, this date is invalid
342 # Expect Header = REMOVAL
343 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
344 # Expect Header = NO CHANGE
345 TAG:^hide-if-modified-since\{\+0\}$
347 {+hide-if-modified-since{-0} -crunch-if-none-match}
348 # Set Header = If-Modified-Since: Gee, this date is invalid
349 # Expect Header = REMOVAL
350 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
351 # Expect Header = NO CHANGE
352 TAG:^hide-if-modified-since\{-0\}$
354 {+hide-if-modified-since{0} -crunch-if-none-match}
355 # Set Header = If-Modified-Since: Gee, this date is invalid
356 # Expect Header = REMOVAL
357 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
358 # Expect Header = NO CHANGE
359 TAG:^hide-if-modified-since\{0\}$
361 {+hide-if-modified-since{NaN} -crunch-if-none-match}
362 # Set Header = If-Modified-Since: Gee, this date is invalid
363 # Expect Header = REMOVAL
364 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
365 # Expect Header = NO CHANGE
366 TAG:^hide-if-modified-since\{NaN\}$
369 #######################################################
370 # Test crunch-outgoing-cookies
371 #######################################################
374 +crunch-outgoing-cookies \
375 -crunch-incoming-cookies \
376 -limit-cookie-lifetime \
377 -session-cookies-only \
378 -hide-if-modified-since \
380 # Set Header = If-Modified-Since: Gee, this date is invalid
381 # Expect Header = NO CHANGE
383 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
384 # Expect Header = REMOVAL
385 TAG:^crunch-outgoing-cookies$
387 #######################################################
388 # Test session-cookies-only
390 # XXX: pretty useless as session-cookies-only doesn't
391 # affect client headers.
392 #######################################################
395 -crunch-outgoing-cookies \
396 -crunch-incoming-cookies \
397 -limit-cookie-lifetime \
398 +session-cookies-only \
399 -hide-if-modified-since \
401 # Set Header = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
402 # Expect Header = NO CHANGE
404 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
405 # Expect Header = NO CHANGE
406 TAG:^session-cookies-only$
408 #######################################################
409 # Test change-x-forwarded-for
410 #######################################################
413 -change-x-forwarded-for \
415 # Set Header = X-Forwarded-For: 10.0.0.1
416 # Expect Header = NO CHANGE
417 TAG:^-change-x-forwarded-for$
420 +change-x-forwarded-for{block} \
422 # Set Header = X-Forwarded-For: 10.0.0.1
423 # Expect Header = REMOVAL
424 TAG:^change-x-forwarded-for\{block\}$
427 +change-x-forwarded-for{add} \
429 # Set Header = X-Forwarded-For: 10.0.0.1
430 # Expect Header = SOME CHANGE
431 TAG:^change-x-forwarded-for\{add\}$
433 #######################################################
434 # Test hide-from-header
435 #######################################################
438 +hide-from-header{block}\
440 # Set Header = From: schneewitchen@example.org
441 # Expect Header = REMOVAL
442 TAG:^hide-from-header\{block\}$
445 +hide-from-header{siebenzwerge@example.org}\
447 # Set Header = From: schneewitchen@example.org
448 # Expect Header = From: siebenzwerge@example.org
449 TAG:^hide-from-header\{siebenzwerge@example.org\}$
451 #######################################################
452 # Test prevent-compression
453 #######################################################
456 +prevent-compression\
458 # Set Header = Accept-Encoding: gzip, deflate
459 # Expect Header = REMOVAL
461 # Set Header = Accept-Encoding: gzip
462 # Expect Header = REMOVAL
464 # Set Header = Accept-Encoding: deflate
465 # Expect Header = REMOVAL
466 TAG:^prevent-compression$
468 #######################################################
469 # Test content filters which could cause problems with
471 #######################################################
474 -client-header-tagger{range-requests} \
475 +deanimate-gifs{last} \
478 # Set Header = Range: bytes=1234-5678
479 # Expect Header = REMOVAL
480 # Set Header = Range: bytes=1-5
481 # Expect Header = REMOVAL
482 # Set Header = If-Range: bytes=1234-5678
483 # Expect Header = REMOVAL
484 # Set Header = Request-Range: bytes=1234-5678
485 # Expect Header = REMOVAL
486 # Set Header = Range: foo
487 # Expect Header = REMOVAL
488 # Set Header = If-Range: foo
489 # Expect Header = REMOVAL
490 # Set Header = Request-Range: foo
491 # Expect Header = REMOVAL
492 # Set Header = Range: bytes=0-5678
493 # Expect Header = NO CHANGE
494 # Set Header = Range: bytes=0-
495 # Expect Header = NO CHANGE
496 # Set Header = If-Range: bytes=0-5678
497 # Expect Header = NO CHANGE
498 # Set Header = If-Range: bytes=0-
499 # Expect Header = NO CHANGE
500 # Set Header = Request-Range: bytes=0-5678
501 # Expect Header = NO CHANGE
502 # Set Header = Request-Range: bytes=0-
503 # Expect Header = NO CHANGE
504 TAG:^deanimate-gifs\{last\}$
507 -client-header-tagger{range-requests} \
509 +filter{banners-by-size} \
511 # Set Header = Range: bytes=1234-5678
512 # Expect Header = REMOVAL
513 # Set Header = Range: bytes=1-5
514 # Expect Header = REMOVAL
515 # Set Header = If-Range: bytes=1234-5678
516 # Expect Header = REMOVAL
517 # Set Header = Request-Range: bytes=1234-5678
518 # Expect Header = REMOVAL
519 # Set Header = Range: bytes=1-5
520 # Expect Header = REMOVAL
521 # Set Header = If-Range: bytes=1234-5678
522 # Expect Header = REMOVAL
523 # Set Header = Request-Range: bytes=1234-5678
524 # Expect Header = REMOVAL
525 # Set Header = Range: foo
526 # Expect Header = REMOVAL
527 # Set Header = If-Range: foo
528 # Expect Header = REMOVAL
529 # Set Header = Request-Range: foo
530 # Expect Header = REMOVAL
531 # Set Header = Range: bytes=0-5678
532 # Expect Header = NO CHANGE
533 # Set Header = Range: bytes=0-
534 # Expect Header = NO CHANGE
535 # Set Header = If-Range: bytes=0-5678
536 # Expect Header = NO CHANGE
537 # Set Header = If-Range: bytes=0-
538 # Expect Header = NO CHANGE
539 # Set Header = Request-Range: bytes=0-5678
540 # Expect Header = NO CHANGE
541 # Set Header = Request-Range: bytes=0-
542 # Expect Header = NO CHANGE
543 TAG:^filter\{banners-by-size\}$
546 -client-header-tagger{range-requests} \
550 # Set Header = Range: bytes=1234-5678
551 # Expect Header = NO CHANGE
552 # Set Header = If-Range: bytes=1234-5678
553 # Expect Header = NO CHANGE
554 # Set Header = Request-Range: bytes=1234-5678
555 # Expect Header = NO CHANGE
556 TAG:^no-content-filter$
559 # Set Header = Connection: keep-alive
560 # Expect Header = NO CHANGE
562 # Set Header = Connection:
563 # Expect Header = REMOVAL
565 TAG:^Connection: keep-alive$
568 # Set Header = Connection: keep-alive
569 # Expect Header = Connection: close
571 # Set Header = Connection:
572 # Expect Header = Connection: close
574 TAG:^Connection: close$
577 # Set Header = Connection: close
578 # Expect Header = NO CHANGE
580 TAG:^connection-sharing disabled$
583 # Set Header = Connection: close
584 # Expect Header = REMOVAL
586 # Set Header = Connection: keep-alive
587 # Expect Header = NO CHANGE
589 TAG:^connection-sharing enabled$
592 # XXX: Removing a header by not specifying a value is
593 # an inherited curl feature and could be viewed as a
594 # bug as far as Privoxy-Regression-Test is concerned.
597 # Expect Header = Host: p.p
601 # Set Header = Host: whatever.example.org
602 # Expect Header = NO CHANGE
603 TAG:^Host header other than the target host$
606 # Set Header = Keep-Alive: 20
607 # Expect Header = NO CHANGE
609 TAG:^Pass Keep-Alive header$
612 # Set Header = Keep-Alive: 20
613 # Expect Header = REMOVAL
615 TAG:^Keep-Alive header removal$
618 # XXX: check the RFC to use a real value
619 # Set Header = proxy-connection: keep-alive
620 # Expect Header = REMOVAL
621 TAG:^Proxy-Connection removal$
624 # Set Header = Proxy-Connection: keep-alive
625 # Expect Header = REMOVAL
626 TAG:^Proxy-Connection removal$
629 # These are somewhat redundant when testing with
630 # GET requests, but I want to remember then when
631 # TRACE requests are supported.
633 # Set Header = Max-Forwards: 0
634 # Expect Header = NO CHANGE
635 # Set Header = Max-Forwards: 1
636 # Expect Header = NO CHANGE
637 # Set Header = Max-Forwards: -1
638 # Expect Header = NO CHANGE
639 # Set Header = Max-Forwards: 3
640 # Expect Header = NO CHANGE
641 TAG:^Max-Forwards header without TRACE method$
644 # Set Header = Proxy-Authorization: blafaseldieda
645 # Expect Header = REMOVAL
647 TAG:^Proxy-Authorization header removal$
650 # Set Header = Proxy-Authorization: blafaseldieda
651 # Expect Header = Proxy-Authorization: blafaseldieda
653 TAG:^Proxy-Authorization header forwarding$
655 ################################################################
657 # Fairly dumb tests for Privoxy CGI pages.
659 # These are mainly useful for checking for memory leaks
660 # with Valgrind or whether or not the user manual is installed
661 # correctly and are unlikely to actually detect any
663 # Note that if "Expect Status Code" is missing, 200 is implied.
665 ################################################################
667 # Fetch Test = http://p.p/
668 # Fetch Test = http://p.p/die
669 # Expect Status Code = 404
671 # Fetch Test = http://p.p/die
672 # Expect Status Code = 200
674 # Fetch Test = http://p.p/show-status
675 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
676 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
677 # XXX: for the invalid ones we probably shouldn't return status code 200.
678 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
679 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
680 # Fetch Test = http://config.privoxy.org/show-status?file=actions
681 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
682 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
683 # Fetch Test = http://config.privoxy.org/show-status?file=filter
684 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
685 # Fetch Test = http://config.privoxy.org/show-status?file=trust
686 # Fetch Test = http://p.p/show-version
687 # Fetch Test = http://p.p/show-request
688 # Fetch Test = http://p.p/show-url-info
689 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
690 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
691 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
692 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
693 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
694 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
695 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
696 # Fetch Test = http://p.p/show-url-info?url=
697 # Fetch Test = http://p.p/show-url-info?url=%2F
698 # Depends on FEATURE_TOGGLE
699 # Fetch Test = http://p.p/toggle
701 # Fetch Test = http://p.p/toggle
702 # Expect Status Code = 404
704 # Fetch Test = http://p.p/edit-actions
705 # Fetch Test = http://p.p/eaa
706 # Fetch Test = http://p.p/eau
707 # Fetch Test = http://p.p/ear
708 # Fetch Test = http://p.p/eal
709 # Fetch Test = http://p.p/eafu
710 # Fetch Test = http://p.p/eas
711 # Fetch Test = http://p.p/easa
712 # Fetch Test = http://p.p/easr
713 # Fetch Test = http://p.p/eass
714 # Fetch Test = http://p.p/edit-actions-for-url
715 # Fetch Test = http://p.p/edit-actions-list
716 # Fetch Test = http://p.p/edit-actions-submit
717 # Fetch Test = http://p.p/edit-actions-url
718 # Fetch Test = http://p.p/edit-actions-url-form
719 # Fetch Test = http://p.p/edit-actions-add-url
720 # Fetch Test = http://p.p/edit-actions-add-url-form
721 # Fetch Test = http://p.p/edit-actions-remove-url
722 # Fetch Test = http://p.p/edit-actions-remove-url-form
723 # Fetch Test = http://p.p/edit-actions-section-add
724 # Fetch Test = http://p.p/edit-actions-section-remove
725 # Fetch Test = http://p.p/edit-actions-section-swap
726 # Fetch Test = http://p.p/error-favicon.ico
727 # Fetch Test = http://p.p/favicon.ico
728 # Fetch Test = http://p.p/robots.txt
729 # Fetch Test = http://p.p/send-banner
730 # Fetch Test = http://p.p/send-stylesheet
731 # Fetch Test = http://p.p/t
732 # Fetch Test = http://p.p/url-info-osd.xml
734 # Trusted CGI Request = http://p.p/edit-actions
735 # Expect Status Code = 302
736 # Level = 12 # Depends on the CGI editor being enabled
737 # Fetch Test = http://p.p/does-not-exist
738 # Expect Status Code = 404
739 # Trusted CGI Request = http://p.p/eaa
740 # Trusted CGI Request = http://p.p/eau
741 # Trusted CGI Request = http://p.p/ear
742 # Trusted CGI Request = http://p.p/eal
743 # Trusted CGI Request = http://p.p/eafu
744 # Trusted CGI Request = http://p.p/eas
745 # Trusted CGI Request = http://p.p/easa
746 # Trusted CGI Request = http://p.p/easr
747 # Trusted CGI Request = http://p.p/eass
748 # Trusted CGI Request = http://p.p/edit-actions-for-url
749 # Trusted CGI Request = http://p.p/edit-actions-list
750 # Trusted CGI Request = http://p.p/edit-actions-submit
751 # Trusted CGI Request = http://p.p/edit-actions-url
752 # Trusted CGI Request = http://p.p/edit-actions-url-form
753 # Trusted CGI Request = http://p.p/edit-actions-add-url
754 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
755 # Trusted CGI Request = http://p.p/edit-actions-remove-url
756 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
757 # Trusted CGI Request = http://p.p/edit-actions-section-add
758 # Trusted CGI Request = http://p.p/edit-actions-section-remove
759 # Trusted CGI Request = http://p.p/edit-actions-section-swap
760 # Trusted CGI Request = http://p.p/send-stylesheet
762 # The following tests depend on Privoxy being configured to deliver the user manual
764 # Fetch Test = http://p.p/user-manual
765 # Expect Status Code = 302
767 # Fetch Test = http://p.p/user-manual/
769 # Fetch Test = http://p.p/user-manual/actions-file.html
771 # Fetch Test = http://p.p/user-manual/appendix.html
773 # Fetch Test = http://p.p/user-manual/config.html
775 # Fetch Test = http://p.p/user-manual/configuration.html
777 # Fetch Test = http://p.p/user-manual/contact.html
779 # Fetch Test = http://p.p/user-manual/copyright.html
781 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
783 # Fetch Test = http://p.p/user-manual/filter-file.html
785 # Fetch Test = http://p.p/user-manual/index.html
787 # Fetch Test = http://p.p/user-manual/installation.html
789 # Fetch Test = http://p.p/user-manual/introduction.html
791 # Fetch Test = http://p.p/user-manual/p_doc.css
793 # Fetch Test = http://p.p/user-manual/proxy2.jpg
795 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
797 # Fetch Test = http://p.p/user-manual/quickstart.html
799 # Fetch Test = http://p.p/user-manual/seealso.html
801 # Fetch Test = http://p.p/user-manual/startup.html
803 # Fetch Test = http://p.p/user-manual/templates.html
805 # Fetch Test = http://p.p/user-manual/whatsnew.html
809 # Method Test = OPTIONS
816 # Method Test = DELETE
817 # Method Test = OPTIONS
818 # Method Test = TRACE
819 # Method Test = CONNECT
820 # Method Test = PROPFIND
821 # Method Test = PROPPATCH
824 # Method Test = MKCOL
826 # Method Test = UNLOCK
827 # Method Test = BCOPY
828 # Method Test = BMOVE
829 # Method Test = BDELETE
830 # Method Test = BPROPFIND
831 # Method Test = BPROPPATCH
832 # Method Test = SUBSCRIBE
833 # Method Test = UNSUBSCRIBE
834 # Method Test = NOTIFY
836 # Method Test = VERSION-CONTROL
837 # Method Test = REPORT
838 # Method Test = CHECKOUT
839 # Method Test = CHECKIN
840 # Method Test = UNCHECKOUT
841 # Method Test = MKWORKSPACE
842 # Method Test = UPDATE
843 # Method Test = LABEL
844 # Method Test = MERGE
845 # Method Test = BASELINE-CONTROL
846 # Method Test = MKACTIVITY
847 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
848 # Expect Status Code = 400
850 {+block{Forbidden Port. You are not supposed to see this.}}
851 config.privoxy.org:1-/
855 config.privoxy.org:3,79-81/
858 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
859 # 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
860 # Expect Status Code = 503
861 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/
863 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
864 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
865 # Expect Status Code = 503
866 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
868 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
869 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
870 # Expect Status Code = 503
871 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
873 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
874 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
875 # Expect Status Code = 503
876 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
878 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
879 # This one currently triggers the same error condition as the
880 # test above (socks5 server unreachable), but once Privoxy
881 # starts to properly reject invalid ports it should become useful.
883 # Fetch Test = http://invalid-forward5-gateway-port.example
884 # Expect Status Code = 503
885 invalid-forward5-gateway-port.example
887 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
888 # Fetch Test = http://forward5-null-gateway-host.example
889 # Expect Status Code = 503
890 forward5-null-gateway-host.example
892 {+limit-connect{443}}
893 # Fetch Test = http://www.forbidden-connect.example:444/
895 # Expect Status Code = 403
896 www.forbidden-connect.example/
898 {+block{This request failed to make it to the target destination which means the test succeeded.}}
899 # Fetch Test = http://www.blocked-request.example/blocked-request
900 # Expect Status Code = 403
901 www.blocked-request.example/blocked-request
904 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
905 # Expect Status Code = 403
906 www.blocked-request.example/blocked-request-with-no-reason-specified
908 # Some domain pattern tests
910 {+block{domain pattern test}}
911 # Blocked URL = http://domain-pattern-test.example/
912 # Blocked URL = http://domain-pattern-test.example.org/
913 domain-pattern-test.example.
915 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
916 # Blocked URL = http://trailing-dot.example.org./
917 # Blocked URL = http://trailing-dot.example.org./foo
918 trailing-dot.example.org
921 # Just in case there is no white-space fuzzer in the house ...
923 # Set Header = X-LWS-Test: no superfluous white space here
924 # Expect Header = NO CHANGE
925 # Set Header = X-LWS-Test: superfluous white space in the house
926 # Expect Header = X-LWS-Test: superfluous white space in the house
927 # Set Header = X-LWS-Test : superfluous white space in the house
928 # Expect Header = X-LWS-Test: superfluous white space in the house
929 # Set Header = X-LWS-Test: :superfluous white space in the house
930 # Expect Header = X-LWS-Test: :superfluous white space in the house
931 # Set Header = X-LWS-Test: :no superfluous white space here
932 # Expect Header = NO CHANGE
933 # Set Header = X-LWS-Test: superfluous white tabs in the house
934 # Expect Header = X-LWS-Test: superfluous white tabs in the house
935 # Set Header = X-LWS-Test : superfluous white tabs in the house
936 # Expect Header = X-LWS-Test: superfluous white tabs in the house
937 # Set Header = X-LWS-Test: "leave quoted lws alone"
938 # Expect Header = X-LWS-Test: "leave quoted lws alone"
939 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
940 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
941 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
942 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
943 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
944 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
945 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
946 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
949 {+fast-redirects{check-decoded-url}}
950 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
951 # Redirect Destination = http://redirected1.example.net/
952 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F¶meter=not-part-of-the-redirected-url
953 # Redirect Destination = http://redirected2.example.net/
954 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F¶meter=not-part-of-the-redirected-url
955 # Redirect Destination = http://redirected3.example.net/
956 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
957 # Redirect Destination = http://redirected4.example.net/¶meter=part-of-the-redirected-url
958 # 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
959 # Redirect Destination = http://redirected5.example.net/¶meter2=part-of-the-redirected-url2
960 # 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
961 # Redirect Destination = http://redirected6.example.net/¶meter2=part-of-the-redirected-url2
962 # 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
963 # Redirect Destination = http://redirected7.example.net/¶meter1=part-of-the-redirected-url1
964 # 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
965 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
966 # 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
967 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
968 # 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
969 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
970 # 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
971 # Redirect Destination = http://redirected8.example.net/¶meter1=part-of-the-redirected-url1
972 redirect.example.net/
973 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
974 # Redirect Destination = http://redirect2.example.net/
975 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
976 # Redirect Destination = http://redirect2.example.net/
977 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
978 # Redirect Destination = http://redirect2.example.net/
979 # These tests verify that Privoxy behaves as intended,
980 # given that the encoded redirect URLs are invalid,
981 # there are no correct redirect URLs.
982 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
983 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
984 # 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%%
985 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
987 {+fast-redirects{simple-check}}
988 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
989 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1
990 redirect2.example.net/