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