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