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