Add another hide-referrer{conditional-forge} test
[privoxy.git] / regression-tests.action
1 #############################################################################
2 #
3 # This is a configuration file for Privoxy-Regression-Test
4 # (included in the source tarball's tools directory and available at
5 # https://www.privoxy.org/gitweb/?p=privoxy.git;a=blob;f=tools/privoxy-regression-test.pl;hb=HEAD).
6 #
7 # After referencing this file in your Privoxy configuration both Privoxy and
8 # Privoxy-Regression-Test should be good to go.
9 #
10 #############################################################################
11 #
12 # Copyright (c) 2007-2020 Fabian Keil <fk@fabiankeil.de>
13 #
14 # Permission to use, copy, modify, and distribute this software for any
15 # purpose with or without fee is hereby granted, provided that the above
16 # copyright notice and this permission notice appear in all copies.
17 #
18 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
19 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
20 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
21 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
22 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
23 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
24 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 #
26 #############################################################################
27
28 {{settings}}
29 for-privoxy-version=3.0.29
30
31 # Some dependencies Privoxy-Regression-Test should know about:
32 #
33 # Level  9 needs = config line user-manual\s+(\.?\.?/|[A-Za-z]:)
34 # Level 12 needs = feature status FEATURE_CGI_EDIT_ACTIONS Yes
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+(2[1-9]+|[3-9]\d+|1\d{2,})
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_64_BIT_TIME_T 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 = config line enable-remote-toggle\s+1
46 # Level 21 needs = config line enable-remote-toggle\s+0
47 # Level 22 needs = config line enable-proxy-authentication-forwarding\s+0
48 # Level 23 needs = config line enable-proxy-authentication-forwarding\s+1
49 # Level 24 needs = feature status FEATURE_CLIENT_TAGS Yes
50 # Level 25 needs = feature status FEATURE_HTTPS_INSPECTION No
51 # Level 26 needs = feature status FEATURE_PCRE_HOST_PATTERNS Yes
52
53 #######################################################
54 # Enable taggers to activate the tests on demand
55 # and suppress hiding the User-Agent for
56 # Privoxy-Regression-Test to save log space.
57 #######################################################
58 {\
59  +client-header-tagger{user-agent} \
60  +client-header-tagger{privoxy-control} \
61  +client-header-filter{privoxy-control} \
62 }
63 config.privoxy.org/
64 p.p/
65 127.0.0.1/
66
67 {-hide-user-agent}
68 TAG:^User-Agent: Privoxy-Regression-Test
69
70 #######################################################
71 # Test accept-language{}.
72 #######################################################
73
74 {+hide-accept-language{en-gb}}
75 # Set Header    = Accept-Language: de-de
76 # Expect Header = Accept-Language: en-gb
77 TAG:^hide-accept-language\{en-gb\}$
78
79 {+hide-accept-language{block}}
80 # Set Header    = Accept-Language: de-de
81 # Expect Header = REMOVAL
82 TAG:^hide-accept-language\{block\}$
83
84 #######################################################
85 # Sections for hide-referrer{} to test:
86 #
87 # 1) conditional-block
88 # 2) conditional-forge
89 # 3) forge
90 # 4) block
91 # 5) a parameter that looks like a valid fake referrer
92 # 6) a parameter that looks like an invalid fake referrer
93 #######################################################
94
95 {+hide-referrer{conditional-block}}
96 # Set Header    = Referer: http://www.example.org/foo
97 # Expect Header = REMOVAL
98 #
99 # Set Header    = Referer: http://p.p/foo
100 # Expect Header = NO CHANGE
101 #
102 # Set Header    = Referer: p.p/
103 # Expect Header = REMOVAL
104 #
105 # Set Header    = Referer: p
106 # Expect Header = REMOVAL
107 #
108 # Set Header    = Referer: http://
109 # Expect Header = REMOVAL
110 #
111 # Set Header    = Referer: https://www.privoxy.org/
112 # Expect Header = REMOVAL
113 TAG:^hide-referrer\{conditional-block\}$
114
115 {+hide-referrer{conditional-forge}}
116 # Set Header    = Referer: http://www.example.org/foo
117 # Expect Header = Referer: http://p.p/
118 #
119 # Set Header    = Referer: http://p.p/foo
120 # Expect Header = NO CHANGE
121 #
122 # Set Header    = Referer: p.p/
123 # Expect Header = Referer: http://p.p/
124 #
125 # Set Header    = Referer: p
126 # Expect Header = Referer: http://p.p/
127 #
128 # Set Header    = Referer: http://
129 # Expect Header = Referer: http://p.p/
130 #
131 # Set Header    = Referer: https://www.privoxy.org/
132 # Expect Header = Referer: http://p.p/
133 #
134 # Set Header    = Referer: http://www.privoxy.org/
135 # Expect Header = Referer: http://p.p/
136 TAG:^hide-referrer\{conditional-forge\}$
137
138 {+hide-referrer{forge}}
139 # Set Header    = Referer: http://www.example.org/foo
140 # Expect Header = Referer: http://p.p/
141 TAG:^hide-referrer\{forge\}$
142
143 {+hide-referrer{block}}
144 # Set Header    = Referer: http://www.example.org/foo
145 # Expect Header = REMOVAL
146 TAG:^hide-referrer\{block\}$
147
148 {+hide-referrer{invalid}}
149 # Set Header    = Referer: http://www.example.org/foo
150 # Expect Header = Referer: invalid
151 TAG:^hide-referrer\{invalid\}$
152
153 {+hide-referrer{http://www.privoxy.org/}}
154 # Set Header    = Referer: http://www.example.org/asdf
155 # Expect Header = Referer: http://www.privoxy.org/
156 TAG:^hide-referrer\{http://www.privoxy.org/\}$
157
158 #{+hide-referrer{}}
159 #TAG:^hide-referrer\{\}$
160
161 #######################################################
162 # Test hide-user-agent{}.
163 #######################################################
164
165 {+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 # 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
167 # 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
168 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\}$
169
170 {+hide-user-agent{block}}
171 # XXX: Check the code that is tested here.
172 # Set Header = ua-blah: blah
173 # Expect Header = REMOVAL
174 TAG:^hide-user-agent{block}$
175
176 {-hide-user-agent{}}
177 # Set Header = ua-blah: blah
178 # Expect Header = NO CHANGE
179 TAG:^-hide-user-agent{block}$
180
181
182 #######################################################
183 # Test add-header{}.
184 #######################################################
185
186 {+add-header{X-Custom-Header: yes, please}}
187 # Set Header    = X-Whatever: foo
188 # Expect Header = X-Custom-Header: yes, please
189 TAG:^add-header\{X-Custom-Header: yes, please\}$
190
191 #######################################################
192 # Test client-header-filter{hide-tor-exit-notation}.
193 #######################################################
194
195 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
196 # Set Header    = Referer: http://p.p.zwiebelsuppe.exit/
197 # Expect Header = Referer: http://p.p/
198 #
199 # Set Header    = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
200 # Expect Header = Referer: http://p.p/foo/bar/baaz/
201 #
202 # Set Header    = Referer: http://p.p/
203 # Expect Header = NO CHANGE
204 #
205 # Set Header    = Referer: http://config.privoxy.org.zwiebelsuppe.exit/foo/bar/baaz.html
206 # Expect Header = Referer: http://config.privoxy.org/foo/bar/baaz.html
207 #
208 # Set Header    = Host: p.p.zwiebelsuppe.exit
209 # Expect Header = Host: p.p
210 #
211 # Set Header    = Host: p.p
212 # Expect Header = NO CHANGE
213 #
214 # Set Header    = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
215 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
216 TAG:^client-header-filter\{hide-tor-exit-notation\}$
217
218 #######################################################
219 # Test client-header-filter{no-brotli-accepted}.
220 #######################################################
221
222 {+client-header-filter{no-brotli-accepted}}
223 # Set Header    = Accept-Encoding: gzip, deflate, br
224 # Expect Header = Accept-Encoding: gzip, deflate
225 #
226 # Set Header    = Accept-Encoding: gzip, br, deflate
227 # Expect Header = Accept-Encoding: gzip, deflate
228 #
229 # Set Header    = Accept-Encoding: br, gzip, deflate
230 # Expect Header = Accept-Encoding: gzip, deflate
231 #
232 # Set Header    = Accept-Encoding: br
233 # Expect Header = Accept-Encoding:
234 #
235 # Set Header    = Accept-Encoding: gzip, deflate
236 # Expect Header = NO CHANGE
237 #
238 TAG:^client-header-filter\{no-brotli-accepted\}$
239
240 #######################################################
241 # Test crunch-client-header{}.
242 #######################################################
243
244 {+crunch-client-header{text/html}}
245 # Set Header    = Content-Type: text/html
246 # Expect Header = REMOVAL
247 #
248 # Set Header    = Content-Type: text/html; charset=4711
249 # Expect Header = REMOVAL
250 #
251 # Set Header    = Content-Type: text/plain
252 # Expect Header = NO CHANGE
253 TAG:^crunch-client-header\{text/plain\}$
254
255 #######################################################
256 # Test crunch-if-none-match.
257 #######################################################
258
259 {+crunch-if-none-match -hide-if-modified-since}
260 # Set Header    = If-None-Match: 8987afd239d2093kd2309kd
261 # Expect Header = REMOVAL
262 #
263 # Set Header    = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
264 # Expect Header = REMOVAL
265 #
266 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
267 # Expect Header = NO CHANGE
268 TAG:^crunch-if-none-match$
269
270 #######################################################
271 # Test hide-if-modified-since
272 #######################################################
273
274 {+hide-if-modified-since{block} -crunch-if-none-match}
275 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
276 # Expect Header = REMOVAL
277 #
278 # Set Header    = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
279 # Expect Header = NO CHANGE
280 TAG:^hide-if-modified-since\{block\}$
281
282 {+hide-if-modified-since{-60} -crunch-if-none-match}
283 # Set Header    = If-Modified-Since: Gee, this date is invalid
284 # Expect Header = REMOVAL
285 #
286 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
287 # Expect Header = SOME CHANGE
288 # Set Header    = If-Modified-Since: Thu, 04-Oct-07 09:56:35 GMT
289 # Expect Header = SOME CHANGE
290 # Set Header    = If-Modified-Since: Thursday, 04-Oct-2007 09:56:35 GMT
291 # Expect Header = SOME CHANGE
292 # Set Header    = If-Modified-Since: Thu, 04-Oct-2007 09:56:35 GMT
293 # Expect Header = SOME CHANGE
294 # Set Header    = If-Modified-Since: Thursday Oct 04 09:56:35 2007 GMT
295 # Expect Header = SOME CHANGE
296 #
297 # Set Header    = If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
298 # Expect Header = SOME CHANGE
299 # Level = 17
300 # Set Header    = If-Modified-Since: Thu, 01-Jan-70 00:00:00 GMT
301 # Expect Header = SOME CHANGE
302 # Level = 17
303 # Set Header    = If-Modified-Since: Thursday, 01-Jan-1970 00:00:00 GMT
304 # Expect Header = SOME CHANGE
305 # Level = 17
306 # Set Header    = If-Modified-Since: Thu, 01-Jan-1970 00:00:00 GMT
307 # Expect Header = SOME CHANGE
308 # Level = 17
309 # Set Header    = If-Modified-Since: Thursday Jan 01 00:00:00 1970 GMT
310 # Expect Header = SOME CHANGE
311 # Level = 17
312 #
313 # Set Header    = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
314 # Expect Header = REMOVAL
315 # Set Header    = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
316 # Expect Header = REMOVAL
317 # Set Header    = If-Modified-Since: Thursday, 01-Jan-123456789 00:00:00 GMT
318 # Expect Header = REMOVAL
319 # Set Header    = If-Modified-Since: Thu, 01-Jan-123456789 00:00:00 GMT
320 # Expect Header = REMOVAL
321 # Set Header    = If-Modified-Since: Thursday Jan 01 00:00:00 123456789 GMT
322 # Expect Header = REMOVAL
323 #
324 # Set Header    = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
325 # Expect Header = SOME CHANGE
326 # Level = 17
327 # Set Header    = If-Modified-Since: Mon, 01-Jan-25 00:00:00 GMT
328 # Expect Header = SOME CHANGE
329 # Level = 17
330 # Set Header    = If-Modified-Since: Monday, 01-Jan-2525 00:00:00 GMT
331 # Expect Header = SOME CHANGE
332 # Level = 17
333 # Set Header    = If-Modified-Since: Mon, 01-Jan-2525 00:00:00 GMT
334 # Expect Header = SOME CHANGE
335 # Level = 17
336 # Set Header    = If-Modified-Since: Monday Jan 01 00:00:00 2525 GMT
337 # Expect Header = SOME CHANGE
338 # Level = 17
339 #
340 # Set Header    = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
341 # Expect Header = SOME CHANGE
342 # Set Header    = If-Modified-Since: Thu, 01-Jan-70 02:00:00 GMT
343 # Expect Header = SOME CHANGE
344 # Set Header    = If-Modified-Since: Thursday, 01-Jan-1970 02:00:00 GMT
345 # Expect Header = SOME CHANGE
346 # Set Header    = If-Modified-Since: Thu, 01-Jan-1970 02:00:00 GMT
347 # Expect Header = SOME CHANGE
348 # Set Header    = If-Modified-Since: Thursday Jan 01 02:00:00 1970 GMT
349 # Expect Header = SOME CHANGE
350 TAG:^hide-if-modified-since\{-60\}$
351
352 {+hide-if-modified-since{+60} -crunch-if-none-match}
353 # Set Header    = If-Modified-Since: Gee, this date is invalid
354 # Expect Header = REMOVAL
355 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
356 # Expect Header = SOME CHANGE
357 # Set Header    = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
358 # Expect Header = SOME CHANGE
359 # Level = 17
360 TAG:^hide-if-modified-since\{\+60\}$
361
362 {+hide-if-modified-since{60} -crunch-if-none-match}
363 # Set Header    = If-Modified-Since: Gee, this date is invalid
364 # Expect Header = REMOVAL
365 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
366 # Expect Header = SOME CHANGE
367 TAG:^hide-if-modified-since\{60\}$
368
369 {+hide-if-modified-since{+0} -crunch-if-none-match}
370 # Set Header    = If-Modified-Since: Gee, this date is invalid
371 # Expect Header = REMOVAL
372 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
373 # Expect Header = NO CHANGE
374 TAG:^hide-if-modified-since\{\+0\}$
375
376 {+hide-if-modified-since{-0} -crunch-if-none-match}
377 # Set Header    = If-Modified-Since: Gee, this date is invalid
378 # Expect Header = REMOVAL
379 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
380 # Expect Header = NO CHANGE
381 TAG:^hide-if-modified-since\{-0\}$
382
383 {+hide-if-modified-since{0} -crunch-if-none-match}
384 # Set Header    = If-Modified-Since: Gee, this date is invalid
385 # Expect Header = REMOVAL
386 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
387 # Expect Header = NO CHANGE
388 TAG:^hide-if-modified-since\{0\}$
389
390 {+hide-if-modified-since{NaN} -crunch-if-none-match}
391 # Set Header    = If-Modified-Since: Gee, this date is invalid
392 # Expect Header = REMOVAL
393 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
394 # Expect Header = NO CHANGE
395 TAG:^hide-if-modified-since\{NaN\}$
396
397
398 #######################################################
399 # Test crunch-outgoing-cookies
400 #######################################################
401
402 {\
403  +crunch-outgoing-cookies \
404  -crunch-incoming-cookies \
405  -limit-cookie-lifetime   \
406  -session-cookies-only    \
407  -hide-if-modified-since  \
408 }
409 # Set Header    = If-Modified-Since: Gee, this date is invalid
410 # Expect Header = NO CHANGE
411 #
412 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
413 # Expect Header = REMOVAL
414 TAG:^crunch-outgoing-cookies$
415
416 #######################################################
417 # Test session-cookies-only
418 #
419 # XXX: pretty useless as session-cookies-only doesn't
420 # affect client headers.
421 #######################################################
422
423 {\
424  -crunch-outgoing-cookies \
425  -crunch-incoming-cookies \
426  -limit-cookie-lifetime   \
427  +session-cookies-only    \
428  -hide-if-modified-since  \
429 }
430 # Set Header    = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
431 # Expect Header = NO CHANGE
432 #
433 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
434 # Expect Header = NO CHANGE
435 TAG:^session-cookies-only$
436
437 #######################################################
438 # Test change-x-forwarded-for
439 #######################################################
440
441 {\
442  -change-x-forwarded-for \
443 }
444 # Set Header    = X-Forwarded-For: 10.0.0.1
445 # Expect Header = NO CHANGE
446 TAG:^-change-x-forwarded-for$
447
448 {\
449  +change-x-forwarded-for{block} \
450 }
451 # Set Header    = X-Forwarded-For: 10.0.0.1
452 # Expect Header = REMOVAL
453 TAG:^change-x-forwarded-for\{block\}$
454
455 {\
456  +change-x-forwarded-for{add} \
457 }
458 # Set Header    = X-Forwarded-For: 10.0.0.1
459 # Expect Header = SOME CHANGE
460 TAG:^change-x-forwarded-for\{add\}$
461
462 #######################################################
463 # Test hide-from-header
464 #######################################################
465
466 {\
467  +hide-from-header{block}\
468 }
469 # Set Header    = From: schneewitchen@example.org
470 # Expect Header = REMOVAL
471 TAG:^hide-from-header\{block\}$
472
473 {\
474  +hide-from-header{siebenzwerge@example.org}\
475 }
476 # Set Header    = From: schneewitchen@example.org
477 # Expect Header = From: siebenzwerge@example.org
478 TAG:^hide-from-header\{siebenzwerge@example.org\}$
479
480 #######################################################
481 # Test prevent-compression
482 #######################################################
483
484 {\
485  +prevent-compression\
486 }
487 # Set Header    = Accept-Encoding: gzip, deflate
488 # Expect Header = REMOVAL
489 #
490 # Set Header    = Accept-Encoding: gzip
491 # Expect Header = REMOVAL
492 #
493 # Set Header    = Accept-Encoding: deflate
494 # Expect Header = REMOVAL
495 TAG:^prevent-compression$
496
497 #######################################################
498 # Test content filters which could cause problems with
499 # range requests.
500 #######################################################
501
502 {\
503  -client-header-tagger{range-requests} \
504  +deanimate-gifs{last} \
505  -filter \
506 }
507 # Set Header    = Range: bytes=1234-5678
508 # Expect Header = REMOVAL
509 # Set Header    = Range: bytes=1-5
510 # Expect Header = REMOVAL
511 # Set Header    = If-Range: bytes=1234-5678
512 # Expect Header = REMOVAL
513 # Set Header    = Request-Range: bytes=1234-5678
514 # Expect Header = REMOVAL
515 # Set Header    = Range: foo
516 # Expect Header = REMOVAL
517 # Set Header    = If-Range: foo
518 # Expect Header = REMOVAL
519 # Set Header    = Request-Range: foo
520 # Expect Header = REMOVAL
521 # Set Header    = Range: bytes=0-5678
522 # Expect Header = NO CHANGE
523 # Set Header    = Range: bytes=0-
524 # Expect Header = NO CHANGE
525 # Set Header    = If-Range: bytes=0-5678
526 # Expect Header = NO CHANGE
527 # Set Header    = If-Range: bytes=0-
528 # Expect Header = NO CHANGE
529 # Set Header    = Request-Range: bytes=0-5678
530 # Expect Header = NO CHANGE
531 # Set Header    = Request-Range: bytes=0-
532 # Expect Header = NO CHANGE
533 TAG:^deanimate-gifs\{last\}$
534
535 {\
536  -client-header-tagger{range-requests} \
537  -deanimate-gifs \
538  +filter{banners-by-size} \
539 }
540 # Set Header    = Range: bytes=1234-5678
541 # Expect Header = REMOVAL
542 # Set Header    = Range: bytes=1-5
543 # Expect Header = REMOVAL
544 # Set Header    = If-Range: bytes=1234-5678
545 # Expect Header = REMOVAL
546 # Set Header    = Request-Range: bytes=1234-5678
547 # Expect Header = REMOVAL
548 # Set Header    = Range: bytes=1-5
549 # Expect Header = REMOVAL
550 # Set Header    = If-Range: bytes=1234-5678
551 # Expect Header = REMOVAL
552 # Set Header    = Request-Range: bytes=1234-5678
553 # Expect Header = REMOVAL
554 # Set Header    = Range: foo
555 # Expect Header = REMOVAL
556 # Set Header    = If-Range: foo
557 # Expect Header = REMOVAL
558 # Set Header    = Request-Range: foo
559 # Expect Header = REMOVAL
560 # Set Header    = Range: bytes=0-5678
561 # Expect Header = NO CHANGE
562 # Set Header    = Range: bytes=0-
563 # Expect Header = NO CHANGE
564 # Set Header    = If-Range: bytes=0-5678
565 # Expect Header = NO CHANGE
566 # Set Header    = If-Range: bytes=0-
567 # Expect Header = NO CHANGE
568 # Set Header    = Request-Range: bytes=0-5678
569 # Expect Header = NO CHANGE
570 # Set Header    = Request-Range: bytes=0-
571 # Expect Header = NO CHANGE
572 TAG:^filter\{banners-by-size\}$
573
574 {\
575  -client-header-tagger{range-requests} \
576  -deanimate-gifs \
577  -filter \
578 }
579 # Set Header    = Range: bytes=1234-5678
580 # Expect Header = NO CHANGE
581 # Set Header    = If-Range: bytes=1234-5678
582 # Expect Header = NO CHANGE
583 # Set Header    = Request-Range: bytes=1234-5678
584 # Expect Header = NO CHANGE
585 TAG:^no-content-filter$
586
587 {}
588 # Set Header    = Connection: keep-alive
589 # Expect Header = NO CHANGE
590 # Level = 13
591 # Set Header    = Connection:
592 # Expect Header = REMOVAL
593 # Level = 13
594 TAG:^Connection: keep-alive$
595
596 {}
597 # Set Header    = Connection: keep-alive
598 # Expect Header = Connection: close
599 # Level = 14
600 # Set Header    = Connection:
601 # Expect Header = Connection: close
602 # Level = 14
603 TAG:^Connection: close$
604
605 {}
606 # Set Header    = Connection: close
607 # Expect Header = NO CHANGE
608 # Level = 15
609 TAG:^connection-sharing disabled$
610
611 {}
612 # XXX: This test is expected to fail when using "https://p.p/"
613 #      as CGI prefix with https inspection enabled but can't
614 #      yet be automatically skipped. By design connections aren't
615 #      shared when using "https://" so Privoxy does not remove the
616 #      header.
617 # Set Header    = Connection: close
618 # Expect Header = REMOVAL
619 # Level = 16
620 # Set Header    = Connection: keep-alive
621 # Expect Header = NO CHANGE
622 # Level = 16
623 TAG:^connection-sharing enabled$
624
625 {}
626 # XXX: Removing a header by not specifying a value is
627 # an inherited curl feature and could be viewed as a
628 # bug as far as Privoxy-Regression-Test is concerned.
629 #
630 # Set Header    = Host:
631 # Expect Header = Host: p.p
632 TAG:^No Host header$
633
634 {}
635 # XXX: This test is expected to fail when using "https://p.p/"
636 #      as CGI prefix with https inspection enabled but can't
637 #      yet be automatically skipped. The reason for the test
638 #      failure is that Privoxy-Regression-Test only modifies
639 #      the Host header for the CONNECT request, not for the
640 #      actual request that follows. Changing that would not
641 #      fix the test though as a modified Host header in the
642 #      actual request would result in Privoxy attempting to
643 #      connect to it.
644 # Set Header    = Host: whatever.example.org
645 # Expect Header = NO CHANGE
646 TAG:^Host header other than the target host$
647
648 {}
649 # Set Header = Keep-Alive: 20
650 # Expect Header = NO CHANGE
651 # Level = 13
652 # Set Header = Keep-Alive: timeout=20, max=3
653 # Expect Header = NO CHANGE
654 # Level = 13
655 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
656 # Expect Header = NO CHANGE
657 # Level = 13
658 # Set Header = Keep-Alive: timeuot=20, max=3
659 # Expect Header = REMOVAL
660 # Level = 13
661 # Set Header = Keep-Alive: twenty seconds please
662 # Expect Header = REMOVAL
663 # Level = 13
664 TAG:^Parse Keep-Alive header$
665
666 {}
667 # Set Header = Keep-Alive: 20
668 # Expect Header = REMOVAL
669 # Level = 14
670 # Set Header = Keep-Alive: timeout=20, max=3
671 # Expect Header = REMOVAL
672 # Level = 14
673 # Set Header = Keep-Alive: blah=fasel, timeout=20, max=3
674 # Expect Header = REMOVAL
675 # Level = 14
676 TAG:^Keep-Alive header removal$
677
678 {}
679 # XXX: check the RFC to use a real value
680 # Set Header = proxy-connection: keep-alive
681 # Expect Header = REMOVAL
682 TAG:^Proxy-Connection removal$
683
684 {}
685 # Set Header = Proxy-Connection: keep-alive
686 # Expect Header = REMOVAL
687 TAG:^Proxy-Connection removal$
688
689 {}
690 # These are somewhat redundant when testing with
691 # GET requests, but I want to remember then when
692 # TRACE requests are supported.
693 #
694 # Set Header = Max-Forwards: 0
695 # Expect Header = NO CHANGE
696 # Set Header = Max-Forwards: 1
697 # Expect Header = NO CHANGE
698 # Set Header = Max-Forwards: -1
699 # Expect Header = NO CHANGE
700 # Set Header = Max-Forwards: 3
701 # Expect Header = NO CHANGE
702 TAG:^Max-Forwards header without TRACE method$
703
704 {}
705 # Set Header = Proxy-Authorization: blafaseldieda
706 # Expect Header = REMOVAL
707 # Level = 22
708 TAG:^Proxy-Authorization header removal$
709
710 {}
711 # Set Header = Proxy-Authorization: blafaseldieda
712 # Expect Header = Proxy-Authorization: blafaseldieda
713 # Level = 23
714 TAG:^Proxy-Authorization header forwarding$
715
716 ################################################################
717 #
718 # Fairly dumb tests for Privoxy CGI pages.
719 #
720 # These are mainly useful for checking for memory leaks
721 # with Valgrind or whether or not the user manual is installed
722 # correctly.
723 #
724 # Note that if "Expect Status Code" is missing, 200 is implied.
725 #
726 ################################################################
727
728 # Fetch Test = http://p.p/
729 # Fetch Test = http://p.p/die
730 # Expect Status Code = 404
731 # Level = 18
732 # Fetch Test = http://p.p/die
733 # Expect Status Code = 200
734 # Level = 19
735 # Fetch Test = http://p.p/show-status
736 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
737 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
738 # XXX: for the invalid ones we probably shouldn't return status code 200.
739 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
740 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
741 # Fetch Test = http://config.privoxy.org/show-status?file=actions
742 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
743 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
744 # Fetch Test = http://config.privoxy.org/show-status?file=filter
745 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
746 # Fetch Test = http://config.privoxy.org/show-status?file=trust
747 # Fetch Test = http://p.p/show-version
748 # Expect Status Code = 404
749 # Fetch Test = http://p.p/show-request
750 # Fetch Test = http://p.p/show-url-info
751 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
752 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
753 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
754 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
755 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
756 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
757 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
758 # Fetch Test = http://p.p/show-url-info?url=
759 # Fetch Test = http://p.p/show-url-info?url=%2F
760 # Depends on FEATURE_TOGGLE
761 # Fetch Test = http://p.p/toggle
762 # Level = 20
763 # Fetch Test = http://p.p/toggle
764 # Expect Status Code = 403
765 # Level = 21
766 # Fetch Test = http://p.p/edit-actions
767 # Expect Status Code = 403
768 # Level = 12
769 # Fetch Test = http://p.p/eaa
770 # Expect Status Code = 403
771 # Level = 12
772 # Fetch Test = http://p.p/eau
773 # Expect Status Code = 403
774 # Level = 12
775 # Fetch Test = http://p.p/ear
776 # Expect Status Code = 403
777 # Level = 12
778 # Fetch Test = http://p.p/eal
779 # Expect Status Code = 403
780 # Level = 12
781 # Fetch Test = http://p.p/eafu
782 # Expect Status Code = 403
783 # Level = 12
784 # Fetch Test = http://p.p/eas
785 # Expect Status Code = 403
786 # Level = 12
787 # Fetch Test = http://p.p/easa
788 # Expect Status Code = 403
789 # Level = 12
790 # Fetch Test = http://p.p/easr
791 # Expect Status Code = 403
792 # Level = 12
793 # Fetch Test = http://p.p/eass
794 # Expect Status Code = 403
795 # Level = 12
796 # Fetch Test = http://p.p/edit-actions-for-url
797 # Expect Status Code = 403
798 # Level = 12
799 # Fetch Test = http://p.p/edit-actions-list
800 # Level = 12
801 # Fetch Test = http://p.p/edit-actions-submit
802 # Expect Status Code = 403
803 # Level = 12
804 # Expect Status Code = 403
805 # Fetch Test = http://p.p/edit-actions-url
806 # Expect Status Code = 403
807 # Level = 12
808 # Fetch Test = http://p.p/edit-actions-url-form
809 # Expect Status Code = 403
810 # Level = 12
811 # Fetch Test = http://p.p/edit-actions-add-url
812 # Expect Status Code = 403
813 # Level = 12
814 # Fetch Test = http://p.p/edit-actions-add-url-form
815 # Expect Status Code = 403
816 # Level = 12
817 # Fetch Test = http://p.p/edit-actions-remove-url
818 # Expect Status Code = 403
819 # Level = 12
820 # Fetch Test = http://p.p/edit-actions-remove-url-form
821 # Expect Status Code = 403
822 # Level = 12
823 # Fetch Test = http://p.p/edit-actions-section-add
824 # Expect Status Code = 403
825 # Level = 12
826 # Fetch Test = http://p.p/edit-actions-section-remove
827 # Expect Status Code = 403
828 # Level = 12
829 # Fetch Test = http://p.p/edit-actions-section-swap
830 # Expect Status Code = 403
831 # Level = 12
832 # Fetch Test = http://p.p/error-favicon.ico
833 # Fetch Test = http://p.p/favicon.ico
834 # Fetch Test = http://p.p/robots.txt
835 # Fetch Test = http://p.p/send-banner
836 # Trusted CGI Request = http://p.p/send-stylesheet
837 # Fetch Test = http://p.p/send-stylesheet
838 # Expect Status Code = 403
839 # Fetch Test = http://p.p/t
840 # Fetch Test = http://p.p/url-info-osd.xml
841 # Fetch Test = http://p.p/client-tags
842 # Level = 24
843 # Trusted CGI Request = http://p.p/toggle-client-tag
844 # Expect Status Code = 302
845 # Level = 24
846 # Fetch Test = http://p.p/toggle-client-tag
847 # Expect Status Code = 403
848 # Level = 24
849
850 # Trusted CGI Request = http://p.p/edit-actions
851 # Expect Status Code = 302
852 # Level = 12 # Depends on the CGI editor being enabled
853 # Fetch Test = http://p.p/does-not-exist
854 # Expect Status Code = 404
855 # Trusted CGI Request = http://p.p/eaa
856 # Level = 12
857 # Trusted CGI Request = http://p.p/eau
858 # Level = 12
859 # Trusted CGI Request = http://p.p/ear
860 # Level = 12
861 # Trusted CGI Request = http://p.p/eal
862 # Level = 12
863 # Trusted CGI Request = http://p.p/eafu
864 # Level = 12
865 # Trusted CGI Request = http://p.p/eas
866 # Level = 12
867 # Trusted CGI Request = http://p.p/easa
868 # Level = 12
869 # Trusted CGI Request = http://p.p/easr
870 # Level = 12
871 # Trusted CGI Request = http://p.p/eass
872 # Level = 12
873 # Trusted CGI Request = http://p.p/edit-actions-for-url
874 # Level = 12
875 # Trusted CGI Request = http://p.p/edit-actions-list
876 # Level = 12
877 # Trusted CGI Request = http://p.p/edit-actions-submit
878 # Level = 12
879 # Trusted CGI Request = http://p.p/edit-actions-url
880 # Level = 12
881 # Trusted CGI Request = http://p.p/edit-actions-url-form
882 # Level = 12
883 # Trusted CGI Request = http://p.p/edit-actions-add-url
884 # Level = 12
885 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
886 # Level = 12
887 # Trusted CGI Request = http://p.p/edit-actions-remove-url
888 # Level = 12
889 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
890 # Level = 12
891 # Trusted CGI Request = http://p.p/edit-actions-section-add
892 # Level = 12
893 # Trusted CGI Request = http://p.p/edit-actions-section-remove
894 # Level = 12
895 # Trusted CGI Request = http://p.p/edit-actions-section-swap
896 # Level = 12
897 # Trusted CGI Request = http://p.p/send-stylesheet
898
899 # The following tests depend on Privoxy being configured to deliver the user manual
900
901 # Fetch Test = http://p.p/user-manual
902 # Expect Status Code = 302
903 # Level = 9
904 # Fetch Test = http://p.p/user-manual/
905 # Level = 9
906 # Fetch Test = http://p.p/user-manual/actions-file.html
907 # Level = 9
908 # Fetch Test = http://p.p/user-manual/appendix.html
909 # Level = 9
910 # Fetch Test = http://p.p/user-manual/config.html
911 # Level = 9
912 # Fetch Test = http://p.p/user-manual/configuration.html
913 # Level = 9
914 # Fetch Test = http://p.p/user-manual/contact.html
915 # Level = 9
916 # Fetch Test = http://p.p/user-manual/copyright.html
917 # Level = 9
918 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
919 # Level = 9
920 # Fetch Test = http://p.p/user-manual/filter-file.html
921 # Level = 9
922 # Fetch Test = http://p.p/user-manual/index.html
923 # Level = 9
924 # Fetch Test = http://p.p/user-manual/installation.html
925 # Level = 9
926 # Fetch Test = http://p.p/user-manual/introduction.html
927 # Level = 9
928 # Fetch Test = http://p.p/user-manual/p_doc.css
929 # Level = 9
930 # Fetch Test = http://p.p/user-manual/proxy2.jpg
931 # Level = 9
932 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
933 # Level = 9
934 # Fetch Test = http://p.p/user-manual/quickstart.html
935 # Level = 9
936 # Fetch Test = http://p.p/user-manual/seealso.html
937 # Level = 9
938 # Fetch Test = http://p.p/user-manual/startup.html
939 # Level = 9
940 # Fetch Test = http://p.p/user-manual/templates.html
941 # Level = 9
942 # Fetch Test = http://p.p/user-manual/whatsnew.html
943 # Level = 9
944
945
946 # Method Test = OPTIONS
947 # Method Test = GET
948 # Method Test = get
949 # Method Test = gEt
950 # Method Test = HEAD
951 # Method Test = POST
952 # Method Test = PUT
953 # Method Test = DELETE
954 # Method Test = OPTIONS
955 # Method Test = TRACE
956 # Method Test = CONNECT
957 # Level = 25
958 # Method Test = PROPFIND
959 # Method Test = PROPPATCH
960 # Method Test = MOVE
961 # Method Test = COPY
962 # Method Test = MKCOL
963 # Method Test = LOCK
964 # Method Test = UNLOCK
965 # Method Test = BCOPY
966 # Method Test = BMOVE
967 # Method Test = BDELETE
968 # Method Test = BPROPFIND
969 # Method Test = BPROPPATCH
970 # Method Test = SUBSCRIBE
971 # Method Test = UNSUBSCRIBE
972 # Method Test = NOTIFY
973 # Method Test = POLL
974 # Method Test = VERSION-CONTROL
975 # Method Test = REPORT
976 # Method Test = CHECKOUT
977 # Method Test = CHECKIN
978 # Method Test = UNCHECKOUT
979 # Method Test = MKWORKSPACE
980 # Method Test = UPDATE
981 # Method Test = LABEL
982 # Method Test = MERGE
983 # Method Test = BASELINE-CONTROL
984 # Method Test = MKACTIVITY
985 # Method Test = PATCH
986 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
987 # Expect Status Code = 400
988
989 {+block{Forbidden Port. You are not supposed to see this.}}
990 config.privoxy.org:1-/
991 p.p:1-/
992
993 {-block}
994 config.privoxy.org:3,79-81/
995 p.p:3,22,79-81/
996
997 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
998 # 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
999 # Expect Status Code = 503
1000 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/
1001
1002 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
1003 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
1004 # Expect Status Code = 503
1005 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
1006
1007 {+forward-override{forward-socks4 127.0.0.1:12345 .}}
1008 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
1009 # Expect Status Code = 503
1010 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
1011
1012 {+forward-override{forward-socks4a 127.0.0.1:12345 .}}
1013 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
1014 # Expect Status Code = 503
1015 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
1016
1017 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
1018 # This one currently triggers the same error condition as the
1019 # test above (socks5 server unreachable), but once Privoxy
1020 # starts to properly reject invalid ports it should become useful.
1021 #
1022 # Fetch Test = http://invalid-forward5-gateway-port.example
1023 # Expect Status Code = 503
1024 invalid-forward5-gateway-port.example
1025
1026 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
1027 # Fetch Test = http://forward5-null-gateway-host.example
1028 # Expect Status Code = 503
1029 forward5-null-gateway-host.example
1030
1031 {+limit-connect{443}}
1032 # Fetch Test = http://www.forbidden-connect.example:444/
1033 # Method = CONNECT
1034 # Expect Status Code = 403
1035 www.forbidden-connect.example/
1036
1037 {+block{This request failed to make it to the target destination which means the test succeeded.}}
1038 # Fetch Test = http://www.blocked-request.example/blocked-request
1039 # Expect Status Code = 403
1040 www.blocked-request.example/blocked-request
1041
1042 {+block}
1043 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
1044 # Expect Status Code = 403
1045 www.blocked-request.example/blocked-request-with-no-reason-specified
1046
1047 # Some domain pattern tests
1048 #
1049 {+block{domain pattern test}}
1050 # Blocked URL = http://domain-pattern-test.example/
1051 # Blocked URL = http://domain-pattern-test.example.org/
1052 domain-pattern-test.example.
1053
1054 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
1055 # Blocked URL = http://trailing-dot.example.org./
1056 # Blocked URL = http://trailing-dot.example.org./foo
1057 trailing-dot.example.org
1058
1059 {}
1060 # Just in case there is no white-space fuzzer in the house ...
1061 #
1062 # Set Header = X-LWS-Test: no superfluous white space here
1063 # Expect Header = NO CHANGE
1064 # Set Header = X-LWS-Test:  superfluous   white space  in  the   house
1065 # Expect Header = X-LWS-Test: superfluous white space in the house
1066 # Set Header = X-LWS-Test   :  superfluous   white   space   in   the    house
1067 # Expect Header = X-LWS-Test: superfluous white space in the house
1068 # Set Header = X-LWS-Test:  :superfluous white space in the house
1069 # Expect Header = X-LWS-Test: :superfluous white space in the house
1070 # Set Header = X-LWS-Test: :no superfluous white space here
1071 # Expect Header = NO CHANGE
1072 # Set Header = X-LWS-Test:      superfluous             white                   tabs in the house
1073 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1074 # Set Header = X-LWS-Test       :       superfluous             white                   tabs in the house
1075 # Expect Header = X-LWS-Test: superfluous white tabs in the house
1076 # Set Header = X-LWS-Test: "leave  quoted  lws alone"
1077 # Expect Header = X-LWS-Test: "leave  quoted  lws alone"
1078 # Set Header = X-LWS-Test:  "leave  quoted  lws alone"  thxbye
1079 # Expect Header = X-LWS-Test: "leave  quoted  lws alone" thxbye
1080 # Set Header = X-LWS-Test: " Do I Look like     quoted  text? Me    thinks  not.
1081 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
1082 # Set Header = X-LWS-Test: "This  is  quoted" this  is  not "but   this  is  again"
1083 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "but   this  is  again"
1084 # Set Header = X-LWS-Test:  "This  is  quoted" this   is  not "this  is  "  but  "  this again   is  not
1085 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "this  is  " but " this again is not
1086 TAG:^LWS Tests$
1087
1088 {+fast-redirects{check-decoded-url}}
1089 # Redirected URL = http://redirect.example.net/blafasel&url=http://redirected1.example.net/
1090 # Redirect Destination = http://redirected1.example.net/
1091 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected2.example.net%2F&parameter=not-part-of-the-redirected-url
1092 # Redirect Destination = http://redirected2.example.net/
1093 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected3.example.net%2F&parameter=not-part-of-the-redirected-url
1094 # Redirect Destination = http://redirected3.example.net/
1095 # Redirected URL = http://redirect.example.net/blafasel&url=http%3A%2F%2Fredirected4.example.net%2F%26parameter=part-of-the-redirected-url
1096 # Redirect Destination = http://redirected4.example.net/&parameter=part-of-the-redirected-url
1097 # 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
1098 # Redirect Destination = http://redirected5.example.net/&parameter2=part-of-the-redirected-url2
1099 # 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
1100 # Redirect Destination = http://redirected6.example.net/&parameter2=part-of-the-redirected-url2
1101 # 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
1102 # Redirect Destination = http://redirected7.example.net/&parameter1=part-of-the-redirected-url1
1103 # 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
1104 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
1105 # 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
1106 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
1107 # 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
1108 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
1109 # 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
1110 # Redirect Destination = http://redirected8.example.net/&parameter1=part-of-the-redirected-url1
1111 redirect.example.net/
1112 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http://redirect2.example.net/
1113 # Redirect Destination = http://redirect2.example.net/
1114 # Redirected URL = http://redirect.example.net/blafasel%3A%2F%2Fredirect1.example.net/http://redirect2.example.net/
1115 # Redirect Destination = http://redirect2.example.net/
1116 # Redirected URL = http://redirect.example.net/blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/
1117 # Redirect Destination = http://redirect2.example.net/
1118 # These tests verify that Privoxy behaves as intended,
1119 # given that the encoded redirect URLs are invalid,
1120 # there are no correct redirect URLs.
1121 # Redirected URL = http://redirect.example.net/%%%%%%%%%%%%%%%%%%%%%%blafaselhttp://redirect1.example.net/http%3A%2F%2Fredirect2.example.net/%%%%%%%%%%%%%%
1122 # Redirect Destination = http://redirect2.example.net/%%%%%%%%%%%%%%
1123 # 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%%
1124 # Redirect Destination = http://redirect2.example.net/%1%2%%3%4%5%6%7%8%9%0%0%%
1125
1126 {+fast-redirects{simple-check}}
1127 # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/&parameter1=part-of-the-redirected-url1&parameter2=part-of-the-redirected-url1
1128 # Redirect Destination = http://redirected.example.net/&parameter1=part-of-the-redirected-url1&parameter2=part-of-the-redirected-url1
1129 redirect2.example.net/
1130
1131 {+delay-response{1}}
1132 # Fetch Test = http://config.privoxy.org/show-url-info?url=http%3A%2F%2Fwww.example.com%2Fprivoxy-test-delay-response
1133 config.privoxy.org/show-url-info\?url=http%3A%2F%2Fwww\.example\.com%2Fprivoxy-test-delay-response
1134
1135 {+block{Block with pcre host pattern}}
1136 # Blocked URL = http://aaa.example.org/
1137 # Level = 26
1138 PCRE-HOST-PATTERN:^a{3}\.example\.org$
1139 # Blocked URL = http://bbb.example.org/
1140 # Level = 26
1141 PCRE-HOST-PATTERN:^(bbb|ccc|ddd)\.example\.org$