don't need the extra time() call
[privoxy.git] / regression-tests.action
1 #############################################################################
2 # $Id: regression-tests.action,v 1.28 2009/06/18 17:14:16 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 # Set Header    = If-Modified-Since: Thu, 1 Jan 123456789 00:00:00 GMT
261 # Expect Header = REMOVAL
262 # Set Header    = If-Modified-Since: Mon, 1 Jan 2525 00:00:00 GMT
263 # Expect Header = SOME CHANGE
264 # Set Header    = If-Modified-Since: Thu, 1 Jan 1970 02:00:00 GMT
265 # Expect Header = SOME CHANGE
266
267 {+hide-if-modified-since{-60} -crunch-if-none-match}
268 TAG:^hide-if-modified-since\{-60\}$
269
270 # Set Header    = If-Modified-Since: Gee, this date is invalid
271 # Expect Header = REMOVAL
272 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
273 # Expect Header = SOME CHANGE
274 # Set Header    = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
275 # Expect Header = SOME CHANGE
276
277 {+hide-if-modified-since{+60} -crunch-if-none-match}
278 TAG:^hide-if-modified-since\{\+60\}$
279
280 # Set Header    = If-Modified-Since: Gee, this date is invalid
281 # Expect Header = REMOVAL
282 # Set Header    = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 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 = NO CHANGE
292
293 {+hide-if-modified-since{+0} -crunch-if-none-match}
294 TAG:^hide-if-modified-since\{\+0\}$
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{NaN} -crunch-if-none-match}
318 TAG:^hide-if-modified-since\{NaN\}$
319
320
321 #######################################################
322 # Test crunch-outgoing-cookies
323 #######################################################
324
325 # Set Header    = If-Modified-Since: Gee, this date is invalid
326 # Expect Header = NO CHANGE
327 #
328 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
329 # Expect Header = REMOVAL
330 {\
331  +crunch-outgoing-cookies \
332  -crunch-incoming-cookies \
333  -session-cookies-only    \
334  -hide-if-modified-since  \
335 }
336 TAG:^crunch-outgoing-cookies$
337
338 #######################################################
339 # Test session-cookies-only
340 #
341 # XXX: pretty useless as session-cookies-only doesn't
342 # affect client headers.
343 #######################################################
344
345 # Set Header    = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
346 # Expect Header = NO CHANGE
347 #
348 # Set Header    = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
349 # Expect Header = NO CHANGE
350 {\
351  -crunch-outgoing-cookies \
352  -crunch-incoming-cookies \
353  +session-cookies-only    \
354  -hide-if-modified-since  \
355 }
356 TAG:^session-cookies-only$
357
358 #######################################################
359 # Test change-x-forwarded-for
360 #######################################################
361
362 # Set Header    = X-Forwarded-For: 10.0.0.1
363 # Expect Header = NO CHANGE
364 {\
365  -change-x-forwarded-for \
366 }
367 TAG:^-change-x-forwarded-for$
368
369 # Set Header    = X-Forwarded-For: 10.0.0.1
370 # Expect Header = REMOVAL
371 {\
372  +change-x-forwarded-for{block} \
373 }
374 TAG:^change-x-forwarded-for\{block\}$
375
376 # Set Header    = X-Forwarded-For: 10.0.0.1
377 # Expect Header = SOME CHANGE
378 {\
379  +change-x-forwarded-for{add} \
380 }
381 TAG:^change-x-forwarded-for\{add\}$
382
383 #######################################################
384 # Test hide-from-header
385 #######################################################
386
387 # Set Header    = From: schneewitchen@example.org
388 # Expect Header = REMOVAL
389 {\
390  +hide-from-header{block}\
391 }
392 TAG:^hide-from-header\{block\}$
393
394 # Set Header    = From: schneewitchen@example.org
395 # Expect Header = From: siebenzwerge@example.org
396 {\
397  +hide-from-header{siebenzwerge@example.org}\
398 }
399 TAG:^hide-from-header\{siebenzwerge@example.org\}$
400
401 #######################################################
402 # Test prevent-compression
403 #######################################################
404
405 # Set Header    = Accept-Encoding: gzip, deflate
406 # Expect Header = REMOVAL
407 #
408 # Set Header    = Accept-Encoding: gzip
409 # Expect Header = REMOVAL
410 #
411 # Set Header    = Accept-Encoding: deflate
412 # Expect Header = REMOVAL
413 {\
414  +prevent-compression\
415 }
416 TAG:^prevent-compression$
417
418 #######################################################
419 # Test content filters which could cause problems with
420 # range requests.
421 #######################################################
422
423 # Set Header    = Range: bytes=1234-5678
424 # Expect Header = REMOVAL
425 # Set Header    = If-Range: bytes=1234-5678
426 # Expect Header = REMOVAL
427 # Set Header    = Request-Range: bytes=1234-5678
428 # Expect Header = REMOVAL
429 {\
430  +deanimate-gifs{last} \
431  -filter \
432 }
433 TAG:^deanimate-gifs\{last\}$
434
435 # Set Header    = Range: bytes=1234-5678
436 # Expect Header = REMOVAL
437 # Set Header    = If-Range: bytes=1234-5678
438 # Expect Header = REMOVAL
439 # Set Header    = Request-Range: bytes=1234-5678
440 # Expect Header = REMOVAL
441 {\
442  -deanimate-gifs \
443  +filter{banners-by-size} \
444 }
445 TAG:^filter\{banners-by-size\}$
446
447 # Set Header    = Range: bytes=1234-5678
448 # Expect Header = NO CHANGE
449 # Set Header    = If-Range: bytes=1234-5678
450 # Expect Header = NO CHANGE
451 # Set Header    = Request-Range: bytes=1234-5678
452 # Expect Header = NO CHANGE
453 {\
454  -deanimate-gifs \
455  -filter \
456 }
457 TAG:^no-content-filter$
458
459 # Set Header    = Connection: keep-alive
460 # Expect Header = NO CHANGE
461 # Level = 13
462 # Set Header    = Connection:
463 # Expect Header = Connection: keep-alive
464 # Level = 13
465 {}
466 TAG:^Connection: keep-alive$
467
468 # Set Header    = Connection: keep-alive
469 # Expect Header = Connection: close
470 # Level = 14
471 # Set Header    = Connection:
472 # Expect Header = Connection: close
473 # Level = 14
474 {}
475 TAG:^Connection: close$
476
477 # Set Header    = Connection: close
478 # Expect Header = NO CHANGE
479 # Level = 15
480 {}
481 TAG:^connection-sharing disabled$
482
483 # Set Header    = Connection: close
484 # Expect Header = Connection: keep-alive
485 # Level = 16
486 # Set Header    = Connection: keep-alive
487 # Expect Header = NO CHANGE
488 # Level = 16
489 {}
490 TAG:^connection-sharing enabled$
491
492 # XXX: Removing a header by not specifying a value is
493 # an inherited curl feature and could be viewed as a
494 # bug as far as Privoxy-Regression-Test is concerned.
495 #
496 # Set Header    = Host:
497 # Expect Header = Host: p.p
498 {}
499 TAG:^No Host header$
500
501 # Set Header    = Host: whatever.example.org
502 # Expect Header = NO CHANGE
503 {}
504 TAG:^Host header other than the target host$
505
506 # Set Header = Keep-Alive: 20
507 # Expect Header = NO CHANGE
508 # Level = 13
509 {}
510 TAG:^Pass Keep-Alive header$
511
512 # Set Header = Keep-Alive: 20
513 # Expect Header = REMOVAL
514 # Level = 14
515 {}
516 TAG:^Keep-Alive header removal$
517
518 # XXX: check the RFC to use a real value
519 # Set Header = proxy-connection: keep-alive
520 # Expect Header = REMOVAL
521 {}
522 TAG:^Proxy-Connection removal$
523
524 # Set Header = Proxy-Connection: keep-alive
525 # Expect Header = REMOVAL
526 {}
527 TAG:^Proxy-Connection removal$
528
529 # These are somewhat redundant when testing with
530 # GET requests, but I want to remember then when
531 # TRACE requests are supported.
532 #
533 # Set Header = Max-Forwards: 0
534 # Expect Header = NO CHANGE
535 # Set Header = Max-Forwards: 1
536 # Expect Header = NO CHANGE
537 # Set Header = Max-Forwards: -1
538 # Expect Header = NO CHANGE
539 # Set Header = Max-Forwards: 3
540 # Expect Header = NO CHANGE
541 {}
542 TAG:^Max-Forwards header without TRACE method$
543
544 ################################################################
545 #
546 # Fairly dumb tests for Privoxy CGI pages.
547 #
548 # These are mainly useful for checking for memory leaks
549 # with Valgrind or whether or not the user manual is installed
550 # correctly and are unlikely to actually detect any
551 #
552 # Note that if "Expect Status Code" is missing, 200 is implied.
553 #
554 ################################################################
555
556 # Fetch Test = http://p.p/
557 # Will fail if compiled with FEATURE_GRACEFUL_TERMINATION
558 # Fetch Test = http://p.p/die
559 # Expect Status Code = 404
560 # Fetch Test = http://p.p/show-status
561 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
562 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
563 # XXX: for the invalid ones we probably shouldn't return status code 200.
564 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
565 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
566 # Fetch Test = http://config.privoxy.org/show-status?file=actions
567 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
568 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
569 # Fetch Test = http://config.privoxy.org/show-status?file=filter
570 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
571 # Fetch Test = http://config.privoxy.org/show-status?file=trust
572 # Fetch Test = http://p.p/show-version
573 # Fetch Test = http://p.p/show-request
574 # Fetch Test = http://p.p/show-url-info
575 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
576 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
577 # Fetch Test = http://p.p/show-url-info?url=HTTp:%2F%2Fwww.privoxy.org%2F
578 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
579 # Fetch Test = http://p.p/show-url-info?url=HtTps:%2F%2Fwww.privoxy.org%2F
580 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
581 # Fetch Test = http://p.p/show-url-info?url=FTp:%2F%2Fwww.privoxy.org%2F
582 # Fetch Test = http://p.p/show-url-info?url=
583 # Fetch Test = http://p.p/show-url-info?url=%2F
584 # Fetch Test = http://p.p/toggle
585 # Fetch Test = http://p.p/edit-actions
586 # Fetch Test = http://p.p/eaa
587 # Fetch Test = http://p.p/eau
588 # Fetch Test = http://p.p/ear
589 # Fetch Test = http://p.p/eal
590 # Fetch Test = http://p.p/eafu
591 # Fetch Test = http://p.p/eas
592 # Fetch Test = http://p.p/easa
593 # Fetch Test = http://p.p/easr
594 # Fetch Test = http://p.p/eass
595 # Fetch Test = http://p.p/edit-actions-for-url
596 # Fetch Test = http://p.p/edit-actions-list
597 # Fetch Test = http://p.p/edit-actions-submit
598 # Fetch Test = http://p.p/edit-actions-url
599 # Fetch Test = http://p.p/edit-actions-url-form
600 # Fetch Test = http://p.p/edit-actions-add-url
601 # Fetch Test = http://p.p/edit-actions-add-url-form
602 # Fetch Test = http://p.p/edit-actions-remove-url
603 # Fetch Test = http://p.p/edit-actions-remove-url-form
604 # Fetch Test = http://p.p/edit-actions-section-add
605 # Fetch Test = http://p.p/edit-actions-section-remove
606 # Fetch Test = http://p.p/edit-actions-section-swap
607 # Fetch Test = http://p.p/error-favicon.ico
608 # Fetch Test = http://p.p/favicon.ico
609 # Fetch Test = http://p.p/robots.txt
610 # Fetch Test = http://p.p/send-banner
611 # Fetch Test = http://p.p/send-stylesheet
612 # Fetch Test = http://p.p/t
613 # Fetch Test = http://p.p/url-info-osd.xml
614
615 # Trusted CGI Request = http://p.p/edit-actions
616 # Expect Status Code = 302
617 # Level = 12 # Depends on the CGI editor being enabled
618 # Fetch Test = http://p.p/does-not-exist
619 # Expect Status Code = 404
620 # Trusted CGI Request = http://p.p/eaa
621 # Trusted CGI Request = http://p.p/eau
622 # Trusted CGI Request = http://p.p/ear
623 # Trusted CGI Request = http://p.p/eal
624 # Trusted CGI Request = http://p.p/eafu
625 # Trusted CGI Request = http://p.p/eas
626 # Trusted CGI Request = http://p.p/easa
627 # Trusted CGI Request = http://p.p/easr
628 # Trusted CGI Request = http://p.p/eass
629 # Trusted CGI Request = http://p.p/edit-actions-for-url
630 # Trusted CGI Request = http://p.p/edit-actions-list
631 # Trusted CGI Request = http://p.p/edit-actions-submit
632 # Trusted CGI Request = http://p.p/edit-actions-url
633 # Trusted CGI Request = http://p.p/edit-actions-url-form
634 # Trusted CGI Request = http://p.p/edit-actions-add-url
635 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
636 # Trusted CGI Request = http://p.p/edit-actions-remove-url
637 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
638 # Trusted CGI Request = http://p.p/edit-actions-section-add
639 # Trusted CGI Request = http://p.p/edit-actions-section-remove
640 # Trusted CGI Request = http://p.p/edit-actions-section-swap
641 # Trusted CGI Request = http://p.p/send-stylesheet
642
643 # The following tests depend on Privoxy being configured to deliver the user manual
644
645 # Fetch Test = http://p.p/user-manual
646 # Expect Status Code = 302
647 # Level = 9
648 # Fetch Test = http://p.p/user-manual/
649 # Level = 9
650 # Fetch Test = http://p.p/user-manual/actions-file.html
651 # Level = 9
652 # Fetch Test = http://p.p/user-manual/appendix.html
653 # Level = 9
654 # Fetch Test = http://p.p/user-manual/config.html
655 # Level = 9
656 # Fetch Test = http://p.p/user-manual/configuration.html
657 # Level = 9
658 # Fetch Test = http://p.p/user-manual/contact.html
659 # Level = 9
660 # Fetch Test = http://p.p/user-manual/copyright.html
661 # Level = 9
662 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
663 # Level = 9
664 # Fetch Test = http://p.p/user-manual/filter-file.html
665 # Level = 9
666 # Fetch Test = http://p.p/user-manual/index.html
667 # Level = 9
668 # Fetch Test = http://p.p/user-manual/installation.html
669 # Level = 9
670 # Fetch Test = http://p.p/user-manual/introduction.html
671 # Level = 9
672 # Fetch Test = http://p.p/user-manual/p_doc.css
673 # Level = 9
674 # Fetch Test = http://p.p/user-manual/proxy2.jpg
675 # Level = 9
676 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
677 # Level = 9
678 # Fetch Test = http://p.p/user-manual/quickstart.html
679 # Level = 9
680 # Fetch Test = http://p.p/user-manual/seealso.html
681 # Level = 9
682 # Fetch Test = http://p.p/user-manual/startup.html
683 # Level = 9
684 # Fetch Test = http://p.p/user-manual/templates.html
685 # Level = 9
686 # Fetch Test = http://p.p/user-manual/upgradersnote.html
687 # Level = 9
688 # Fetch Test = http://p.p/user-manual/whatsnew.html
689 # Level = 9
690
691
692 # Method Test = OPTIONS
693 # Method Test = GET
694 # Method Test = get
695 # Method Test = gEt
696 # Method Test = HEAD
697 # Method Test = POST
698 # Method Test = PUT
699 # Method Test = DELETE
700 # Method Test = OPTIONS
701 # Method Test = TRACE
702 # Method Test = CONNECT
703 # Method Test = PROPFIND
704 # Method Test = PROPPATCH
705 # Method Test = MOVE
706 # Method Test = COPY
707 # Method Test = MKCOL
708 # Method Test = LOCK
709 # Method Test = UNLOCK
710 # Method Test = BCOPY
711 # Method Test = BMOVE
712 # Method Test = BDELETE
713 # Method Test = BPROPFIND
714 # Method Test = BPROPPATCH
715 # Method Test = SUBSCRIBE
716 # Method Test = UNSUBSCRIBE
717 # Method Test = NOTIFY
718 # Method Test = POLL
719 # Method Test = VERSION-CONTROL
720 # Method Test = REPORT
721 # Method Test = CHECKOUT
722 # Method Test = CHECKIN
723 # Method Test = UNCHECKOUT
724 # Method Test = MKWORKSPACE
725 # Method Test = UPDATE
726 # Method Test = LABEL
727 # Method Test = MERGE
728 # Method Test = BASELINE-CONTROL
729 # Method Test = MKACTIVITY
730 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
731 # Expect Status Code = 400
732
733 {+block{Forbidden Port. You are not supposed to see this.}}
734 config.privoxy.org:1-/
735 p.p:1-/
736
737 {-block}
738 config.privoxy.org:3,79-81/
739 p.p:3,22,79-81/
740
741 # 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
742 # Expect Status Code = 503
743 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
744 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/
745
746 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
747 # Expect Status Code = 503
748 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
749 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
750
751 # This one currently triggers the same error condition as the
752 # test above (socks5 server unreachable), but once Privoxy
753 # starts to properly reject invalid ports it should become useful.
754
755 # Fetch Test = http://invalid-forward5-gateway-port.example
756 # Expect Status Code = 503
757 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
758 invalid-forward5-gateway-port.example
759
760 # Fetch Test = http://forward5-null-gateway-host.example
761 # Expect Status Code = 503
762 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
763 forward5-null-gateway-host.example
764
765 # Fetch Test = http://www.forbidden-connect.example:444/
766 # Method = CONNECT
767 # Expect Status Code = 403
768 {+limit-connect{443}}
769 www.forbidden-connect.example/
770
771 # Fetch Test = http://www.blocked-request.example/blocked-request
772 # Expect Status Code = 403
773 {+block{This request failed to make it to the target destination which means the test succeeded.}}
774 www.blocked-request.example/blocked-request
775
776 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
777 # Expect Status Code = 403
778 {+block}
779 www.blocked-request.example/blocked-request-with-no-reason-specified
780
781 # Some domain pattern tests
782 #
783 {+block{domain pattern test}}
784 # Blocked URL = http://domain-pattern-test.example/
785 # Blocked URL = http://domain-pattern-test.example.org/
786 domain-pattern-test.example.
787
788 {+block{Hostname patterns without trailing dots cover hostnames with trailing dots as well.}}
789 # Blocked URL = http://trailing-dot.example.org./
790 # Blocked URL = http://trailing-dot.example.org./foo
791 trailing-dot.example.org
792
793 # Just in case there is no white-space fuzzer in the house ...
794 #
795 # Set Header = X-LWS-Test: no superfluous white space here
796 # Expect Header = NO CHANGE
797 # Set Header = X-LWS-Test:  superfluous   white space  in  the   house
798 # Expect Header = X-LWS-Test: superfluous white space in the house
799 # Set Header = X-LWS-Test   :  superfluous   white   space   in   the    house
800 # Expect Header = X-LWS-Test: superfluous white space in the house
801 # Set Header = X-LWS-Test:  :superfluous white space in the house
802 # Expect Header = X-LWS-Test: :superfluous white space in the house
803 # Set Header = X-LWS-Test: :no superfluous white space here
804 # Expect Header = NO CHANGE
805 # Set Header = X-LWS-Test:      superfluous             white                   tabs in the house
806 # Expect Header = X-LWS-Test: superfluous white tabs in the house
807 # Set Header = X-LWS-Test       :       superfluous             white                   tabs in the house
808 # Expect Header = X-LWS-Test: superfluous white tabs in the house
809 # Set Header = X-LWS-Test: "leave  quoted  lws alone"
810 # Expect Header = X-LWS-Test: "leave  quoted  lws alone"
811 # Set Header = X-LWS-Test:  "leave  quoted  lws alone"  thxbye
812 # Expect Header = X-LWS-Test: "leave  quoted  lws alone" thxbye
813 # Set Header = X-LWS-Test: " Do I Look like     quoted  text? Me    thinks  not.
814 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
815 # Set Header = X-LWS-Test: "This  is  quoted" this  is  not "but   this  is  again"
816 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "but   this  is  again"
817 # Set Header = X-LWS-Test:  "This  is  quoted" this   is  not "this  is  "  but  "  this again   is  not
818 # Expect Header = X-LWS-Test: "This  is  quoted" this is not "this  is  " but " this again is not
819 {}
820 TAG:^LWS Tests$