Bump copyright and note that the tests now require 3.0.20 or later to work
[privoxy.git] / regression-tests.action
1 #############################################################################
2 # $Id: regression-tests.action,v 1.43 2012/04/06 15:17:41 fabiankeil Exp $
3 #############################################################################
4 #
5 # This is a configuration file for Privoxy-Regression-Test
6 # (included in the source tarball's tools directory).
7 #
8 # After referencing it in your Privoxy configuration both Privoxy and
9 # Privoxy-Regression-Test should be good to go.
10 #
11 #############################################################################
12 #
13 # Copyright (c) 2007-2012 Fabian Keil <fk@fabiankeil.de>
14 #
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.
18 #
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.
26 #
27 #############################################################################
28
29 # While the syntax used is understood by Privoxy 3.0.14 and later,
30 # some of the +fast-redirects{} tests require at least 3.0.20 to work.
31 {{settings}}
32 for-privoxy-version=3.0.20
33
34 # Some dependencies Privoxy-Regression-Test should know about:
35 #
36 # Level  9 needs = config line user-manual\s+(\.?\.?/|[A-Za-z]:)
37 # Level 12 needs = config line enable-edit-actions\s+1
38 # Level 13 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
39 # Level 13 needs = config line keep-alive-timeout\s+[1-9]+
40 # Level 14 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE No
41 # Level 15 needs = config line connection-sharing\s+0
42 # Level 16 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes
43 # Level 16 needs = config line connection-sharing\s+1
44 # Level 17 needs = feature status FEATURE_PTHREAD Yes
45 # Level 18 needs = feature status FEATURE_GRACEFUL_TERMINATION No
46 # Level 19 needs = feature status FEATURE_GRACEFUL_TERMINATION Yes
47 # Level 20 needs = feature status FEATURE_TOGGLE Yes
48 # Level 21 needs = feature status FEATURE_TOGGLE No
49
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 #######################################################
55 {\
56  +client-header-tagger{user-agent} \
57  +client-header-tagger{privoxy-control} \
58  +client-header-filter{privoxy-control} \
59 }
60 config.privoxy.org/
61 p.p/
62 127.0.0.1/
63
64 {-hide-user-agent}
65 TAG:^User-Agent: Privoxy-Regression-Test
66
67 #######################################################
68 # Test accept-language{}.
69 #######################################################
70
71 # Set Header    = Accept-Language: de-de
72 # Expect Header = Accept-Language: en-gb
73 {+hide-accept-language{en-gb}}
74 TAG:^hide-accept-language\{en-gb\}$
75
76 # Set Header    = Accept-Language: de-de
77 # Expect Header = REMOVAL
78 {+hide-accept-language{block}}
79 TAG:^hide-accept-language\{block\}$
80
81 #######################################################
82 # Sections for hide-referrer{} to test:
83 #
84 # 1) conditional-block
85 # 2) conditional-forge
86 # 3) forge
87 # 4) block
88 # 5) a parameter that looks like a valid fake referrer
89 # 6) a parameter that looks like an invalid fake referrer
90 #######################################################
91
92 # Set Header    = Referer: http://www.example.org/foo
93 # Expect Header = REMOVAL
94 #
95 # Set Header    = Referer: http://p.p/foo
96 # Expect Header = NO CHANGE
97 #
98 # Set Header    = Referer: p.p/
99 # Expect Header = REMOVAL
100 #
101 # Set Header    = Referer: p
102 # Expect Header = REMOVAL
103 #
104 # Set Header    = Referer: http://
105 # Expect Header = REMOVAL
106 #
107 # Set Header    = Referer: https://p.p/
108 # Expect Header = REMOVAL
109 {+hide-referrer{conditional-block}}
110 TAG:^hide-referrer\{conditional-block\}$
111
112 # Set Header    = Referer: http://www.example.org/foo
113 # Expect Header = Referer: http://p.p/
114 #
115 # Set Header    = Referer: http://p.p/foo
116 # Expect Header = NO CHANGE
117 #
118 # Set Header    = Referer: p.p/
119 # Expect Header = Referer: http://p.p/
120 #
121 # Set Header    = Referer: p
122 # Expect Header = Referer: http://p.p/
123 #
124 # Set Header    = Referer: http://
125 # Expect Header = Referer: http://p.p/
126 #
127 # Set Header    = Referer: https://p.p/
128 # Expect Header = Referer: http://p.p/
129 {+hide-referrer{conditional-forge}}
130 TAG:^hide-referrer\{conditional-forge\}$
131
132 # Set Header    = Referer: http://www.example.org/foo
133 # Expect Header = Referer: http://p.p/
134 {+hide-referrer{forge}}
135 TAG:^hide-referrer\{forge\}$
136
137 # Set Header    = Referer: http://www.example.org/foo
138 # Expect Header = REMOVAL
139 {+hide-referrer{block}}
140 TAG:^hide-referrer\{block\}$
141
142 # Set Header    = Referer: http://www.example.org/foo
143 # Expect Header = Referer: invalid
144 {+hide-referrer{invalid}}
145 TAG:^hide-referrer\{invalid\}$
146
147 # Set Header    = Referer: http://www.example.org/asdf
148 # Expect Header = Referer: http://www.privoxy.org/
149 {+hide-referrer{http://www.privoxy.org/}}
150 TAG:^hide-referrer\{http://www.privoxy.org/\}$
151
152 #{+hide-referrer{}}
153 #TAG:^hide-referrer\{\}$
154
155 #######################################################
156 # Test hide-user-agent{}.
157 #######################################################
158
159 # 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
160 # 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
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 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\}$
163
164 # XXX: Check the code that is tested here.
165 # Set Header = ua-blah: blah
166 # Expect Header = REMOVAL
167 {+hide-user-agent{block}}
168 TAG:^hide-user-agent{block}$
169
170 # Set Header = ua-blah: blah
171 # Expect Header = NO CHANGE
172 {-hide-user-agent{}}
173 TAG:^-hide-user-agent{block}$
174
175
176 #######################################################
177 # Test add-header{}.
178 #######################################################
179
180 # Set Header    = X-Whatever: foo
181 # Expect Header = X-Custom-Header: yes, please
182
183 {+add-header{X-Custom-Header: yes, please}}
184 TAG:^add-header\{X-Custom-Header: yes, please\}$
185
186 #######################################################
187 # Test client-header-filter{hide-tor-exit-notation}.
188 #######################################################
189
190 # Set Header    = Referer: http://p.p.zwiebelsuppe.exit/
191 # Expect Header = Referer: http://p.p/
192 #
193 # Set Header    = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
194 # Expect Header = Referer: http://p.p/foo/bar/baaz/
195 #
196 # Set Header    = Referer: http://p.p/
197 # Expect Header = NO CHANGE
198 #
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
201 #
202 # Set Header    = Host: p.p.zwiebelsuppe.exit
203 # Expect Header = Host: p.p
204 #
205 # Set Header    = Host: p.p
206 # Expect Header = NO CHANGE
207 #
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
211 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
212 TAG:^client-header-filter\{hide-tor-exit-notation\}$
213
214 #######################################################
215 # Test crunch-client-header{}.
216 #######################################################
217
218 # Set Header    = Content-Type: text/html
219 # Expect Header = REMOVAL
220 #
221 # Set Header    = Content-Type: text/html; charset=4711
222 # Expect Header = REMOVAL
223 #
224 # Set Header    = Content-Type: text/plain
225 # Expect Header = NO CHANGE
226
227 {+crunch-client-header{text/html}}
228 TAG:^crunch-client-header\{text/plain\}$
229
230
231 #######################################################
232 # Test crunch-if-none-match.
233 #######################################################
234
235 # Set Header    = If-None-Match: 8987afd239d2093kd2309kd
236 # Expect Header = REMOVAL
237
238 # Set Header    = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
239 # Expect Header = REMOVAL
240
241 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
242 # Expect Header = NO CHANGE
243
244 {+crunch-if-none-match -hide-if-modified-since}
245 TAG:^crunch-if-none-match$
246
247 #######################################################
248 # Test hide-if-modified-since
249 #######################################################
250
251 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
252 # Expect Header = REMOVAL
253 #
254 # Set Header    = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
255 # Expect Header = NO CHANGE
256
257 {+hide-if-modified-since{block} -crunch-if-none-match}
258 TAG:^hide-if-modified-since\{block\}$
259
260 # Set Header    = If-Modified-Since: Gee, this date is invalid
261 # Expect Header = REMOVAL
262 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
263 # Expect Header = SOME CHANGE
264 # Set Header    = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
265 # Expect Header = SOME CHANGE
266 # Level = 17
267 # Set Header    = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
268 # Expect Header = REMOVAL
269 # Set Header    = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
270 # Expect Header = SOME CHANGE
271 # Level = 17
272 # Set Header    = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
273 # Expect Header = SOME CHANGE
274
275 {+hide-if-modified-since{-60} -crunch-if-none-match}
276 TAG:^hide-if-modified-since\{-60\}$
277
278 # Set Header    = If-Modified-Since: Gee, this date is invalid
279 # Expect Header = REMOVAL
280 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
281 # Expect Header = SOME CHANGE
282 # Set Header    = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
283 # Expect Header = SOME CHANGE
284
285 {+hide-if-modified-since{+60} -crunch-if-none-match}
286 TAG:^hide-if-modified-since\{\+60\}$
287
288 # Set Header    = If-Modified-Since: Gee, this date is invalid
289 # Expect Header = REMOVAL
290 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
291 # Expect Header = SOME CHANGE
292
293 {+hide-if-modified-since{60} -crunch-if-none-match}
294 TAG:^hide-if-modified-since\{60\}$
295
296 # Set Header    = If-Modified-Since: Gee, this date is invalid
297 # Expect Header = REMOVAL
298 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
299 # Expect Header = NO CHANGE
300
301 {+hide-if-modified-since{+0} -crunch-if-none-match}
302 TAG:^hide-if-modified-since\{\+0\}$
303
304 # Set Header    = If-Modified-Since: Gee, this date is invalid
305 # Expect Header = REMOVAL
306 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
307 # Expect Header = NO CHANGE
308
309 {+hide-if-modified-since{-0} -crunch-if-none-match}
310 TAG:^hide-if-modified-since\{-0\}$
311
312 # Set Header    = If-Modified-Since: Gee, this date is invalid
313 # Expect Header = REMOVAL
314 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
315 # Expect Header = NO CHANGE
316
317 {+hide-if-modified-since{0} -crunch-if-none-match}
318 TAG:^hide-if-modified-since\{0\}$
319
320 # Set Header    = If-Modified-Since: Gee, this date is invalid
321 # Expect Header = REMOVAL
322 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
323 # Expect Header = NO CHANGE
324
325 {+hide-if-modified-since{NaN} -crunch-if-none-match}
326 TAG:^hide-if-modified-since\{NaN\}$
327
328
329 #######################################################
330 # Test crunch-outgoing-cookies
331 #######################################################
332
333 # Set Header    = If-Modified-Since: Gee, this date is invalid
334 # Expect Header = NO CHANGE
335 #
336 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
337 # Expect Header = REMOVAL
338 {\
339  +crunch-outgoing-cookies \
340  -crunch-incoming-cookies \
341  -session-cookies-only    \
342  -hide-if-modified-since  \
343 }
344 TAG:^crunch-outgoing-cookies$
345
346 #######################################################
347 # Test session-cookies-only
348 #
349 # XXX: pretty useless as session-cookies-only doesn't
350 # affect client headers.
351 #######################################################
352
353 # Set Header    = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
354 # Expect Header = NO CHANGE
355 #
356 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
357 # Expect Header = NO CHANGE
358 {\
359  -crunch-outgoing-cookies \
360  -crunch-incoming-cookies \
361  +session-cookies-only    \
362  -hide-if-modified-since  \
363 }
364 TAG:^session-cookies-only$
365
366 #######################################################
367 # Test change-x-forwarded-for
368 #######################################################
369
370 # Set Header    = X-Forwarded-For: 10.0.0.1
371 # Expect Header = NO CHANGE
372 {\
373  -change-x-forwarded-for \
374 }
375 TAG:^-change-x-forwarded-for$
376
377 # Set Header    = X-Forwarded-For: 10.0.0.1
378 # Expect Header = REMOVAL
379 {\
380  +change-x-forwarded-for{block} \
381 }
382 TAG:^change-x-forwarded-for\{block\}$
383
384 # Set Header    = X-Forwarded-For: 10.0.0.1
385 # Expect Header = SOME CHANGE
386 {\
387  +change-x-forwarded-for{add} \
388 }
389 TAG:^change-x-forwarded-for\{add\}$
390
391 #######################################################
392 # Test hide-from-header
393 #######################################################
394
395 # Set Header    = From: schneewitchen@example.org
396 # Expect Header = REMOVAL
397 {\
398  +hide-from-header{block}\
399 }
400 TAG:^hide-from-header\{block\}$
401
402 # Set Header    = From: schneewitchen@example.org
403 # Expect Header = From: siebenzwerge@example.org
404 {\
405  +hide-from-header{siebenzwerge@example.org}\
406 }
407 TAG:^hide-from-header\{siebenzwerge@example.org\}$
408
409 #######################################################
410 # Test prevent-compression
411 #######################################################
412
413 # Set Header    = Accept-Encoding: gzip, deflate
414 # Expect Header = REMOVAL
415 #
416 # Set Header    = Accept-Encoding: gzip
417 # Expect Header = REMOVAL
418 #
419 # Set Header    = Accept-Encoding: deflate
420 # Expect Header = REMOVAL
421 {\
422  +prevent-compression\
423 }
424 TAG:^prevent-compression$
425
426 #######################################################
427 # Test content filters which could cause problems with
428 # range requests.
429 #######################################################
430
431 # Set Header    = Range: bytes=1234-5678
432 # Expect Header = REMOVAL
433 # Set Header    = Range: bytes=1-5
434 # Expect Header = REMOVAL
435 # Set Header    = If-Range: bytes=1234-5678
436 # Expect Header = REMOVAL
437 # Set Header    = Request-Range: bytes=1234-5678
438 # Expect Header = REMOVAL
439 # Set Header    = Range: bytes=0-5678
440 # Expect Header = NO CHANGE
441 # Set Header    = Range: bytes=0-
442 # Expect Header = NO CHANGE
443 # Set Header    = If-Range: bytes=0-5678
444 # Expect Header = NO CHANGE
445 # Set Header    = If-Range: bytes=0-
446 # Expect Header = NO CHANGE
447 # Set Header    = Request-Range: bytes=0-5678
448 # Expect Header = NO CHANGE
449 # Set Header    = Request-Range: bytes=0-
450 # Expect Header = NO CHANGE
451 {\
452  -client-header-tagger{range-requests} \
453  +deanimate-gifs{last} \
454  -filter \
455 }
456 TAG:^deanimate-gifs\{last\}$
457
458 # Set Header    = Range: bytes=1234-5678
459 # Expect Header = REMOVAL
460 # Set Header    = Range: bytes=1-5
461 # Expect Header = REMOVAL
462 # Set Header    = If-Range: bytes=1234-5678
463 # Expect Header = REMOVAL
464 # Set Header    = Request-Range: bytes=1234-5678
465 # Expect Header = REMOVAL
466 # Set Header    = Range: bytes=0-5678
467 # Expect Header = NO CHANGE
468 # Set Header    = Range: bytes=0-
469 # Expect Header = NO CHANGE
470 # Set Header    = If-Range: bytes=0-5678
471 # Expect Header = NO CHANGE
472 # Set Header    = If-Range: bytes=0-
473 # Expect Header = NO CHANGE
474 # Set Header    = Request-Range: bytes=0-5678
475 # Expect Header = NO CHANGE
476 # Set Header    = Request-Range: bytes=0-
477 # Expect Header = NO CHANGE
478 {\
479  -client-header-tagger{range-requests} \
480  -deanimate-gifs \
481  +filter{banners-by-size} \
482 }
483 TAG:^filter\{banners-by-size\}$
484
485 # Set Header    = Range: bytes=1234-5678
486 # Expect Header = NO CHANGE
487 # Set Header    = If-Range: bytes=1234-5678
488 # Expect Header = NO CHANGE
489 # Set Header    = Request-Range: bytes=1234-5678
490 # Expect Header = NO CHANGE
491 {\
492  -client-header-tagger{range-requests} \
493  -deanimate-gifs \
494  -filter \
495 }
496 TAG:^no-content-filter$
497
498 # Set Header    = Connection: keep-alive
499 # Expect Header = NO CHANGE
500 # Level = 13
501 # Set Header    = Connection:
502 # Expect Header = REMOVAL
503 # Level = 13
504 {}
505 TAG:^Connection: keep-alive$
506
507 # Set Header    = Connection: keep-alive
508 # Expect Header = Connection: close
509 # Level = 14
510 # Set Header    = Connection:
511 # Expect Header = Connection: close
512 # Level = 14
513 {}
514 TAG:^Connection: close$
515
516 # Set Header    = Connection: close
517 # Expect Header = NO CHANGE
518 # Level = 15
519 {}
520 TAG:^connection-sharing disabled$
521
522 # Set Header    = Connection: close
523 # Expect Header = REMOVAL
524 # Level = 16
525 # Set Header    = Connection: keep-alive
526 # Expect Header = NO CHANGE
527 # Level = 16
528 {}
529 TAG:^connection-sharing enabled$
530
531 # XXX: Removing a header by not specifying a value is
532 # an inherited curl feature and could be viewed as a
533 # bug as far as Privoxy-Regression-Test is concerned.
534 #
535 # Set Header    = Host:
536 # Expect Header = Host: p.p
537 {}
538 TAG:^No Host header$
539
540 # Set Header    = Host: whatever.example.org
541 # Expect Header = NO CHANGE
542 {}
543 TAG:^Host header other than the target host$
544
545 # Set Header = Keep-Alive: 20
546 # Expect Header = NO CHANGE
547 # Level = 13
548 {}
549 TAG:^Pass Keep-Alive header$
550
551 # Set Header = Keep-Alive: 20
552 # Expect Header = REMOVAL
553 # Level = 14
554 {}
555 TAG:^Keep-Alive header removal$
556
557 # XXX: check the RFC to use a real value
558 # Set Header = proxy-connection: keep-alive
559 # Expect Header = REMOVAL
560 {}
561 TAG:^Proxy-Connection removal$
562
563 # Set Header = Proxy-Connection: keep-alive
564 # Expect Header = REMOVAL
565 {}
566 TAG:^Proxy-Connection removal$
567
568 # These are somewhat redundant when testing with
569 # GET requests, but I want to remember then when
570 # TRACE requests are supported.
571 #
572 # Set Header = Max-Forwards: 0
573 # Expect Header = NO CHANGE
574 # Set Header = Max-Forwards: 1
575 # Expect Header = NO CHANGE
576 # Set Header = Max-Forwards: -1
577 # Expect Header = NO CHANGE
578 # Set Header = Max-Forwards: 3
579 # Expect Header = NO CHANGE
580 {}
581 TAG:^Max-Forwards header without TRACE method$
582
583 ################################################################
584 #
585 # Fairly dumb tests for Privoxy CGI pages.
586 #
587 # These are mainly useful for checking for memory leaks
588 # with Valgrind or whether or not the user manual is installed
589 # correctly and are unlikely to actually detect any
590 #
591 # Note that if "Expect Status Code" is missing, 200 is implied.
592 #
593 ################################################################
594
595 # Fetch Test = http://p.p/
596 # Fetch Test = http://p.p/die
597 # Expect Status Code = 404
598 # Level = 18
599 # Fetch Test = http://p.p/die
600 # Expect Status Code = 200
601 # Level = 19
602 # Fetch Test = http://p.p/show-status
603 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
604 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
605 # XXX: for the invalid ones we probably shouldn't return status code 200.
606 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
607 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
608 # Fetch Test = http://config.privoxy.org/show-status?file=actions
609 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
610 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
611 # Fetch Test = http://config.privoxy.org/show-status?file=filter
612 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
613 # Fetch Test = http://config.privoxy.org/show-status?file=trust
614 # Fetch Test = http://p.p/show-version
615 # Fetch Test = http://p.p/show-request
616 # Fetch Test = http://p.p/show-url-info
617 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
618 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
619 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
620 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
621 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
622 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
623 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
624 # Fetch Test = http://p.p/show-url-info?url=
625 # Fetch Test = http://p.p/show-url-info?url=%2F
626 # Depends on FEATURE_TOGGLE
627 # Fetch Test = http://p.p/toggle
628 # Level = 20
629 # Fetch Test = http://p.p/toggle
630 # Expect Status Code = 404
631 # Level = 21
632 # Fetch Test = http://p.p/edit-actions
633 # Fetch Test = http://p.p/eaa
634 # Fetch Test = http://p.p/eau
635 # Fetch Test = http://p.p/ear
636 # Fetch Test = http://p.p/eal
637 # Fetch Test = http://p.p/eafu
638 # Fetch Test = http://p.p/eas
639 # Fetch Test = http://p.p/easa
640 # Fetch Test = http://p.p/easr
641 # Fetch Test = http://p.p/eass
642 # Fetch Test = http://p.p/edit-actions-for-url
643 # Fetch Test = http://p.p/edit-actions-list
644 # Fetch Test = http://p.p/edit-actions-submit
645 # Fetch Test = http://p.p/edit-actions-url
646 # Fetch Test = http://p.p/edit-actions-url-form
647 # Fetch Test = http://p.p/edit-actions-add-url
648 # Fetch Test = http://p.p/edit-actions-add-url-form
649 # Fetch Test = http://p.p/edit-actions-remove-url
650 # Fetch Test = http://p.p/edit-actions-remove-url-form
651 # Fetch Test = http://p.p/edit-actions-section-add
652 # Fetch Test = http://p.p/edit-actions-section-remove
653 # Fetch Test = http://p.p/edit-actions-section-swap
654 # Fetch Test = http://p.p/error-favicon.ico
655 # Fetch Test = http://p.p/favicon.ico
656 # Fetch Test = http://p.p/robots.txt
657 # Fetch Test = http://p.p/send-banner
658 # Fetch Test = http://p.p/send-stylesheet
659 # Fetch Test = http://p.p/t
660 # Fetch Test = http://p.p/url-info-osd.xml
661
662 # Trusted CGI Request = http://p.p/edit-actions
663 # Expect Status Code = 302
664 # Level = 12 # Depends on the CGI editor being enabled
665 # Fetch Test = http://p.p/does-not-exist
666 # Expect Status Code = 404
667 # Trusted CGI Request = http://p.p/eaa
668 # Trusted CGI Request = http://p.p/eau
669 # Trusted CGI Request = http://p.p/ear
670 # Trusted CGI Request = http://p.p/eal
671 # Trusted CGI Request = http://p.p/eafu
672 # Trusted CGI Request = http://p.p/eas
673 # Trusted CGI Request = http://p.p/easa
674 # Trusted CGI Request = http://p.p/easr
675 # Trusted CGI Request = http://p.p/eass
676 # Trusted CGI Request = http://p.p/edit-actions-for-url
677 # Trusted CGI Request = http://p.p/edit-actions-list
678 # Trusted CGI Request = http://p.p/edit-actions-submit
679 # Trusted CGI Request = http://p.p/edit-actions-url
680 # Trusted CGI Request = http://p.p/edit-actions-url-form
681 # Trusted CGI Request = http://p.p/edit-actions-add-url
682 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
683 # Trusted CGI Request = http://p.p/edit-actions-remove-url
684 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
685 # Trusted CGI Request = http://p.p/edit-actions-section-add
686 # Trusted CGI Request = http://p.p/edit-actions-section-remove
687 # Trusted CGI Request = http://p.p/edit-actions-section-swap
688 # Trusted CGI Request = http://p.p/send-stylesheet
689
690 # The following tests depend on Privoxy being configured to deliver the user manual
691
692 # Fetch Test = http://p.p/user-manual
693 # Expect Status Code = 302
694 # Level = 9
695 # Fetch Test = http://p.p/user-manual/
696 # Level = 9
697 # Fetch Test = http://p.p/user-manual/actions-file.html
698 # Level = 9
699 # Fetch Test = http://p.p/user-manual/appendix.html
700 # Level = 9
701 # Fetch Test = http://p.p/user-manual/config.html
702 # Level = 9
703 # Fetch Test = http://p.p/user-manual/configuration.html
704 # Level = 9
705 # Fetch Test = http://p.p/user-manual/contact.html
706 # Level = 9
707 # Fetch Test = http://p.p/user-manual/copyright.html
708 # Level = 9
709 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
710 # Level = 9
711 # Fetch Test = http://p.p/user-manual/filter-file.html
712 # Level = 9
713 # Fetch Test = http://p.p/user-manual/index.html
714 # Level = 9
715 # Fetch Test = http://p.p/user-manual/installation.html
716 # Level = 9
717 # Fetch Test = http://p.p/user-manual/introduction.html
718 # Level = 9
719 # Fetch Test = http://p.p/user-manual/p_doc.css
720 # Level = 9
721 # Fetch Test = http://p.p/user-manual/proxy2.jpg
722 # Level = 9
723 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
724 # Level = 9
725 # Fetch Test = http://p.p/user-manual/quickstart.html
726 # Level = 9
727 # Fetch Test = http://p.p/user-manual/seealso.html
728 # Level = 9
729 # Fetch Test = http://p.p/user-manual/startup.html
730 # Level = 9
731 # Fetch Test = http://p.p/user-manual/templates.html
732 # Level = 9
733 # Fetch Test = http://p.p/user-manual/whatsnew.html
734 # Level = 9
735
736
737 # Method Test = OPTIONS
738 # Method Test = GET
739 # Method Test = get
740 # Method Test = gEt
741 # Method Test = HEAD
742 # Method Test = POST
743 # Method Test = PUT
744 # Method Test = DELETE
745 # Method Test = OPTIONS
746 # Method Test = TRACE
747 # Method Test = CONNECT
748 # Method Test = PROPFIND
749 # Method Test = PROPPATCH
750 # Method Test = MOVE
751 # Method Test = COPY
752 # Method Test = MKCOL
753 # Method Test = LOCK
754 # Method Test = UNLOCK
755 # Method Test = BCOPY
756 # Method Test = BMOVE
757 # Method Test = BDELETE
758 # Method Test = BPROPFIND
759 # Method Test = BPROPPATCH
760 # Method Test = SUBSCRIBE
761 # Method Test = UNSUBSCRIBE
762 # Method Test = NOTIFY
763 # Method Test = POLL
764 # Method Test = VERSION-CONTROL
765 # Method Test = REPORT
766 # Method Test = CHECKOUT
767 # Method Test = CHECKIN
768 # Method Test = UNCHECKOUT
769 # Method Test = MKWORKSPACE
770 # Method Test = UPDATE
771 # Method Test = LABEL
772 # Method Test = MERGE
773 # Method Test = BASELINE-CONTROL
774 # Method Test = MKACTIVITY
775 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
776 # Expect Status Code = 400
777
778 {+block{Forbidden Port. You are not supposed to see this.}}
779 config.privoxy.org:1-/
780 p.p:1-/
781
782 {-block}
783 config.privoxy.org:3,79-81/
784 p.p:3,22,79-81/
785
786 # 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
787 # Expect Status Code = 503
788 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
789 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/
790
791 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
792 # Expect Status Code = 503
793 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
794 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
795
796 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
797 # Expect Status Code = 503
798 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
799 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
800
801 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
802 # Expect Status Code = 503
803 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
804 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
805
806 # This one currently triggers the same error condition as the
807 # test above (socks5 server unreachable), but once Privoxy
808 # starts to properly reject invalid ports it should become useful.
809
810 # Fetch Test = http://invalid-forward5-gateway-port.example
811 # Expect Status Code = 503
812 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
813 invalid-forward5-gateway-port.example
814
815 # Fetch Test = http://forward5-null-gateway-host.example
816 # Expect Status Code = 503
817 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
818 forward5-null-gateway-host.example
819
820 # Fetch Test = http://www.forbidden-connect.example:444/
821 # Method = CONNECT
822 # Expect Status Code = 403
823 {+limit-connect{443}}
824 www.forbidden-connect.example/
825
826 # Fetch Test = http://www.blocked-request.example/blocked-request
827 # Expect Status Code = 403
828 {+block{This request failed to make it to the target destination which means the test succeeded.}}
829 www.blocked-request.example/blocked-request
830
831 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
832 # Expect Status Code = 403
833 {+block}
834 www.blocked-request.example/blocked-request-with-no-reason-specified
835
836 # Some domain pattern tests
837 #
838 {+block{domain pattern test}}
839 # Blocked URL = http://domain-pattern-test.example/
840 # Blocked URL = http://domain-pattern-test.example.org/
841 domain-pattern-test.example.
842
843 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
844 # Blocked URL = http://trailing-dot.example.org./
845 # Blocked URL = http://trailing-dot.example.org./foo
846 trailing-dot.example.org
847
848 # Just in case there is no white-space fuzzer in the house ...
849 #
850 # Set Header = X-LWS-Test: no superfluous white space here
851 # Expect Header = NO CHANGE
852 # Set Header = X-LWS-Test:  superfluous   white space  in  the   house
853 # Expect Header = X-LWS-Test: superfluous white space in the house
854 # Set Header = X-LWS-Test   :  superfluous   white   space   in   the    house
855 # Expect Header = X-LWS-Test: superfluous white space in the house
856 # Set Header = X-LWS-Test:  :superfluous white space in the house
857 # Expect Header = X-LWS-Test: :superfluous white space in the house
858 # Set Header = X-LWS-Test: :no superfluous white space here
859 # Expect Header = NO CHANGE
860 # Set Header = X-LWS-Test:      superfluous             white                   tabs in the house
861 # Expect Header = X-LWS-Test: superfluous white tabs in the house
862 # Set Header = X-LWS-Test       :       superfluous             white                   tabs in the house
863 # Expect Header = X-LWS-Test: superfluous white tabs in the house
864 # Set Header = X-LWS-Test: "leave  quoted  lws alone"
865 # Expect Header = X-LWS-Test: "leave  quoted  lws alone"
866 # Set Header = X-LWS-Test:  "leave  quoted  lws alone"  thxbye
867 # Expect Header = X-LWS-Test: "leave  quoted  lws alone" thxbye
868 # Set Header = X-LWS-Test: " Do I Look like     quoted  text? Me    thinks  not.
869 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
870 # Set Header = X-LWS-Test: "This  is  quoted" this  is  not "but   this  is  again"
871 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "but   this  is  again"
872 # Set Header = X-LWS-Test:  "This  is  quoted" this   is  not "this  is  "  but  "  this again   is  not
873 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "this  is  " but " this again is not
874 {}
875 TAG:^LWS Tests$
876
877 {+fast-redirects{check-decoded-url}}
878 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
879 # Redirect Destination = http://redirected1.example.net/
880 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F&parameter=not-part-of-the-redirected-url
881 # Redirect Destination = http://redirected2.example.net/
882 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F&parameter=not-part-of-the-redirected-url
883 # Redirect Destination = http://redirected3.example.net/
884 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
885 # Redirect Destination = http://redirected4.example.net/&parameter=part-of-the-redirected-url
886 # 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
887 # Redirect Destination = http://redirected5.example.net/&parameter2=part-of-the-redirected-url2
888 # 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&parameter3=not-part-of-the-redirected-url2
889 # Redirect Destination = http://redirected6.example.net/&parameter2=part-of-the-redirected-url2
890 # Redirected URL = http://redirect.example.net/blafasel?x=http%3A%2F%2Fredirected7.example.net%2F%26parameter1=part-of-the-redirected-url1&parameter2=not-part-of-the-redirected-url1
891 # Redirect Destination = http://redirected7.example.net/&parameter1=part-of-the-redirected-url1
892 # Redirected URL = http://redirect.example.net/blafasel?x=http%3A%2F%2Fredirected8.example.net%2F%26parameter1=part-of-the-redirected-url1&parameter2=not-part-of-the-redirected-url1&parameter3=not-part-of-the-redirected-url1
893 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
894 # 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&parameter2=not-part-of-the-redirected-url1&parameter3=not-part-of-the-redirected-url1
895 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
896 # Redirected URL = http://redirect.example.net/blafasel???????????????????????????????=http%3A%2F%2Fredirected8.example.net%2F%26parameter1=part-of-the-redirected-url1&parameter2=not-part-of-the-redirected-url1&parameter3=not-part-of-the-redirected-url1
897 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
898 # Redirected URL = http://redirect.example.net/blafasel&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&=http%3A%2F%2Fredirected8.example.net%2F%26parameter1=part-of-the-redirected-url1&parameter2=not-part-of-the-redirected-url1&parameter3=not-part-of-the-redirected-url1
899 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
900 redirect.example.net/
901 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
902 # Redirect Destination = http://redirect2.example.net/
903 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
904 # Redirect Destination = http://redirect2.example.net/
905 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
906 # Redirect Destination = http://redirect2.example.net/
907 # These tests verify that Privoxy behaves as intended,
908 # given that the encoded redirect URLs are invalid,
909 # there are no correct redirect URLs.
910 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
911 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
912 # 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%%
913 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
914
915 {+fast-redirects{simple-check}}
916 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/&parameter1=part-of-the-redirected-url1&parameter2=part-of-the-redirected-url1
917 # Redirect Destination = http://redirected.example.net/&parameter1=part-of-the-redirected-url1&parameter2=part-of-the-redirected-url1
918 redirect2.example.net/
919