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