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