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