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