1 #############################################################################
2 # $Id: regression-tests.action,v 1.71 2008/05/26 07:07:20 fk Exp $
3 #############################################################################
5 # This is a configuration file for Privoxy-Regression-Test
6 # (included in the source tarball's tools directory).
8 # After referencing it in your Privoxy configuration both Privoxy and
9 # Privoxy-Regression-Test should be good to go.
11 #############################################################################
13 # Copyright (c) 2007-2008 Fabian Keil <fk@fabiankeil.de>
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.
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.
27 #############################################################################
30 for-privoxy-version=3.0.9
32 # Some dependencies Privoxy-Regression-Test should know about:
34 # Level 9 needs = config line user-manual\s+/
35 # Level 12 needs = config line enable-edit-actions\s+1
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 #######################################################
43 +client-header-tagger{user-agent} \
44 +client-header-tagger{privoxy-control} \
45 +client-header-filter{privoxy-control} \
51 TAG:^User-Agent: Privoxy-Regression-Test
53 #######################################################
54 # Test accept-language{}.
55 #######################################################
57 # Set Header = Accept-Language: de-de
58 # Expect Header = Accept-Language: en-gb
59 {+hide-accept-language{en-gb}}
60 TAG:^hide-accept-language\{en-gb\}$
62 # Set Header = Accept-Language: de-de
63 # Expect Header = REMOVAL
64 {+hide-accept-language{block}}
65 TAG:^hide-accept-language\{block\}$
67 #######################################################
68 # Sections for hide-referrer{} to test:
70 # 1) conditional-block
71 # 2) conditional-forge
74 # 5) a parameter that looks like a valid fake referrer
75 # 6) a parameter that looks like an invalid fake referrer
76 #######################################################
78 # Set Header = Referer: http://www.example.org/foo
79 # Expect Header = REMOVAL
81 # Set Header = Referer: http://p.p/foo
82 # Expect Header = NO CHANGE
83 {+hide-referrer{conditional-block}}
84 TAG:^hide-referrer\{conditional-block\}$
86 # Set Header = Referer: http://www.example.org/foo
87 # Expect Header = Referer: http://p.p/
89 # Set Header = Referer: http://p.p/foo
90 # Expect Header = NO CHANGE
91 {+hide-referrer{conditional-forge}}
92 TAG:^hide-referrer\{conditional-forge\}$
94 # Set Header = Referer: http://www.example.org/foo
95 # Expect Header = Referer: http://p.p/
96 {+hide-referrer{forge}}
97 TAG:^hide-referrer\{forge\}$
99 # Set Header = Referer: http://www.example.org/foo
100 # Expect Header = REMOVAL
101 {+hide-referrer{block}}
102 TAG:^hide-referrer\{block\}$
104 # Set Header = Referer: http://www.example.org/foo
105 # Expect Header = Referer: invalid
106 {+hide-referrer{invalid}}
107 TAG:^hide-referrer\{invalid\}$
109 # Set Header = Referer: http://www.example.org/asdf
110 # Expect Header = Referer: http://www.privoxy.org/
111 {+hide-referrer{http://www.privoxy.org/}}
112 TAG:^hide-referrer\{http://www.privoxy.org/\}$
115 #TAG:^hide-referrer\{\}$
117 #######################################################
118 # Test hide-user-agent{}.
119 #######################################################
121 # 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
122 # 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
123 {+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD alpha; en-GB; rv:1.8.1.6) Gecko/20070913 Firefox/2.0.0.6}}
124 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 # XXX: Check the code that is tested here.
127 # Set Header = ua-blah: blah
128 # Expect Header = REMOVAL
129 {+hide-user-agent{block}}
130 TAG:^hide-user-agent{block}$
132 # Set Header = ua-blah: blah
133 # Expect Header = NO CHANGE
135 TAG:^-hide-user-agent{block}$
138 #######################################################
140 #######################################################
142 # Set Header = X-Whatever: foo
143 # Expect Header = X-Custom-Header: yes, please
145 {+add-header{X-Custom-Header: yes, please}}
146 TAG:^add-header\{X-Custom-Header: yes, please\}$
148 #######################################################
149 # Test client-header-filter{hide-tor-exit-notation}.
150 #######################################################
152 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/
153 # Expect Header = Referer: http://p.p/
155 # Set Header = Referer: http://p.p.zwiebelsuppe.exit/foo/bar/baaz/
156 # Expect Header = Referer: http://p.p/foo/bar/baaz/
158 # Set Header = Referer: http://p.p/
159 # Expect Header = NO CHANGE
161 # Set Header = Referer: http://config.privoxy.org.zwiebelsuppe.exit/foo/bar/baaz.html
162 # Expect Header = Referer: http://config.privoxy.org/foo/bar/baaz.html
164 # Set Header = Host: p.p.zwiebelsuppe.exit
165 # Expect Header = Host: p.p
167 # Set Header = Host: p.p
168 # Expect Header = NO CHANGE
170 # Set Header = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
171 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
173 {+client-header-filter{hide-tor-exit-notation} -hide-referer}
174 TAG:^client-header-filter\{hide-tor-exit-notation\}$
176 #######################################################
177 # Test crunch-client-header{}.
178 #######################################################
180 # Set Header = Content-Type: text/html
181 # Expect Header = REMOVAL
183 # Set Header = Content-Type: text/html; charset=4711
184 # Expect Header = REMOVAL
186 # Set Header = Content-Type: text/plain
187 # Expect Header = NO CHANGE
189 {+crunch-client-header{text/html}}
190 TAG:^crunch-client-header\{text/plain\}$
193 #######################################################
194 # Test crunch-if-none-match.
195 #######################################################
197 # Set Header = If-None-Match: 8987afd239d2093kd2309kd
198 # Expect Header = REMOVAL
200 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
201 # Expect Header = REMOVAL
203 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
204 # Expect Header = NO CHANGE
206 {+crunch-if-none-match -hide-if-modified-since}
207 TAG:^crunch-if-none-match$
209 #######################################################
210 # Test hide-if-modified-since
211 #######################################################
213 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
214 # Expect Header = REMOVAL
216 # Set Header = If-None-Match: 82c3cb50c984ef11b1fed749949b2a16
217 # Expect Header = NO CHANGE
219 {+hide-if-modified-since{block} -crunch-if-none-match}
220 TAG:^hide-if-modified-since\{block\}$
222 # Set Header = If-Modified-Since: Gee, this date is invalid
223 # Expect Header = REMOVAL
224 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
225 # Expect Header = SOME CHANGE
227 {+hide-if-modified-since{-60} -crunch-if-none-match}
228 TAG:^hide-if-modified-since\{-60\}$
230 # Set Header = If-Modified-Since: Gee, this date is invalid
231 # Expect Header = REMOVAL
232 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
233 # Expect Header = SOME CHANGE
235 {+hide-if-modified-since{+60} -crunch-if-none-match}
236 TAG:^hide-if-modified-since\{\+60\}$
238 # Set Header = If-Modified-Since: Gee, this date is invalid
239 # Expect Header = REMOVAL
240 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
241 # Expect Header = SOME CHANGE
243 {+hide-if-modified-since{60} -crunch-if-none-match}
244 TAG:^hide-if-modified-since\{60\}$
246 # Set Header = If-Modified-Since: Gee, this date is invalid
247 # Expect Header = REMOVAL
248 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
249 # Expect Header = NO CHANGE
251 {+hide-if-modified-since{+0} -crunch-if-none-match}
252 TAG:^hide-if-modified-since\{\+0\}$
254 # Set Header = If-Modified-Since: Gee, this date is invalid
255 # Expect Header = REMOVAL
256 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
257 # Expect Header = NO CHANGE
259 {+hide-if-modified-since{-0} -crunch-if-none-match}
260 TAG:^hide-if-modified-since\{-0\}$
262 # Set Header = If-Modified-Since: Gee, this date is invalid
263 # Expect Header = REMOVAL
264 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
265 # Expect Header = NO CHANGE
267 {+hide-if-modified-since{0} -crunch-if-none-match}
268 TAG:^hide-if-modified-since\{0\}$
270 # Set Header = If-Modified-Since: Gee, this date is invalid
271 # Expect Header = REMOVAL
272 # Set Header = If-Modified-Since: Thu, 04 Oct 2007 09:56:35 GMT
273 # Expect Header = NO CHANGE
275 {+hide-if-modified-since{NaN} -crunch-if-none-match}
276 TAG:^hide-if-modified-since\{NaN\}$
279 #######################################################
280 # Test crunch-outgoing-cookies
281 #######################################################
283 # Set Header = If-Modified-Since: Gee, this date is invalid
284 # Expect Header = NO CHANGE
286 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
287 # Expect Header = REMOVAL
289 +crunch-outgoing-cookies \
290 -crunch-incoming-cookies \
291 -session-cookies-only \
292 -hide-if-modified-since \
294 TAG:^crunch-outgoing-cookies$
296 #######################################################
297 # Test session-cookies-only
299 # XXX: pretty useless as session-cookies-only doesn't
300 # affect client headers.
301 #######################################################
303 # Set Header = Cookie: NSC_gffe-iuuq-mc-wtfswfs=8efb330d3660;expires=Thu, 04-Oct-07 19:11:34 GMT;path=/
304 # Expect Header = NO CHANGE
306 # Set Header = Cookie: PREF=ID=6cf0abd34262:TM=117335617:LM=1617:S=jZypyJ7LPiwFi1_
307 # Expect Header = NO CHANGE
309 -crunch-outgoing-cookies \
310 -crunch-incoming-cookies \
311 +session-cookies-only \
312 -hide-if-modified-since \
314 TAG:^session-cookies-only$
316 #######################################################
317 # Test hide-forwarded-for-headers
318 #######################################################
320 # Set Header = X-Forwarded-For: 10.0.0.1
321 # Expect Header = REMOVAL
323 +hide-forwarded-for-headers \
325 TAG:^hide-forwarded-for-headers$
327 # Set Header = X-Forwarded-For: 10.0.0.1
328 # Expect Header = NO CHANGE
330 -hide-forwarded-for-headers \
332 TAG:^-hide-forwarded-for-headers$
334 #######################################################
335 # Test hide-from-header
336 #######################################################
338 # Set Header = From: schneewitchen@example.org
339 # Expect Header = REMOVAL
341 +hide-from-header{block}\
343 TAG:^hide-from-header\{block\}$
345 # Set Header = From: schneewitchen@example.org
346 # Expect Header = From: siebenzwerge@example.org
348 +hide-from-header{siebenzwerge@example.org}\
350 TAG:^hide-from-header\{siebenzwerge@example.org\}$
352 #######################################################
353 # Test prevent-compression
354 #######################################################
356 # Set Header = Accept-Encoding: gzip, deflate
357 # Expect Header = REMOVAL
359 # Set Header = Accept-Encoding: gzip
360 # Expect Header = REMOVAL
362 # Set Header = Accept-Encoding: deflate
363 # Expect Header = REMOVAL
365 +prevent-compression\
367 TAG:^prevent-compression$
369 #######################################################
370 # Test content filters which could cause problems with
372 #######################################################
374 # Set Header = Range: bytes=1234-5678
375 # Expect Header = REMOVAL
376 # Set Header = If-Range: bytes=1234-5678
377 # Expect Header = REMOVAL
378 # Set Header = Request-Range: bytes=1234-5678
379 # Expect Header = REMOVAL
381 +deanimate-gifs{last} \
384 TAG:^deanimate-gifs\{last\}$
386 # Set Header = Range: bytes=1234-5678
387 # Expect Header = REMOVAL
388 # Set Header = If-Range: bytes=1234-5678
389 # Expect Header = REMOVAL
390 # Set Header = Request-Range: bytes=1234-5678
391 # Expect Header = REMOVAL
394 +filter{banners-by-size} \
396 TAG:^filter\{banners-by-size\}$
398 # Set Header = Range: bytes=1234-5678
399 # Expect Header = NO CHANGE
400 # Set Header = If-Range: bytes=1234-5678
401 # Expect Header = NO CHANGE
402 # Set Header = Request-Range: bytes=1234-5678
403 # Expect Header = NO CHANGE
408 TAG:^no-content-filter$
410 # Set Header = Connection: keep-alive
411 # Expect Header = Connection: close
412 # Set Header = Connection:
413 # Expect Header = Connection: close
415 TAG:^Connection: close$
417 # XXX: Removing a header by not specifying a value is
418 # an inherited curl feature and could be viewed as a
419 # bug as far as Privoxy-Regression-Test is concerned.
422 # Expect Header = Host: p.p
426 # Set Header = Host: whatever.example.org
427 # Expect Header = NO CHANGE
429 TAG:^Host header other than the target host$
431 # XXX: check the RFC to use a real value
432 # Set Header = Keep-Alive: Yes
433 # Expect Header = REMOVAL
435 TAG:^Keep-Alive header removal$
437 # XXX: check the RFC to use a real value
438 # Set Header = proxy-connection: keep-alive
439 # Expect Header = REMOVAL
441 TAG:^Proxy-Connection removal$
443 # Set Header = Proxy-Connection: keep-alive
444 # Expect Header = REMOVAL
446 TAG:^Proxy-Connection removal$
448 # These are somewhat redundant when testing with
449 # GET requests, but I want to remember then when
450 # TRACE requests are supported.
452 # Set Header = Max-Forwards: 0
453 # Expect Header = NO CHANGE
454 # Set Header = Max-Forwards: 1
455 # Expect Header = NO CHANGE
456 # Set Header = Max-Forwards: -1
457 # Expect Header = NO CHANGE
458 # Set Header = Max-Forwards: 3
459 # Expect Header = NO CHANGE
461 TAG:^Max-Forwards header without TRACE method$
463 ################################################################
465 # Fairly dumb tests for Privoxy CGI pages.
467 # These are mainly useful for checking for memory leaks
468 # with Valgrind or whether or not the user manual is installed
469 # correctly and are unlikely to actually detect any
471 # Note that if "Expect Status Code" is missing, 200 is implied.
473 ################################################################
475 # Fetch Test = http://p.p/
476 # Will fail if compiled with FEATURE_GRACEFUL_TERMINATION
477 # Fetch Test = http://p.p/die
478 # Expect Status Code = 404
479 # Fetch Test = http://p.p/show-status
480 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=0
481 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=0
482 # XXX: for the invalid ones we probably shouldn't return status code 200.
483 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=100
484 # Fetch Test = http://config.privoxy.org/show-status?file=actions&index=NaN
485 # Fetch Test = http://config.privoxy.org/show-status?file=actions
486 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=100
487 # Fetch Test = http://config.privoxy.org/show-status?file=filter&index=NaN
488 # Fetch Test = http://config.privoxy.org/show-status?file=filter
489 # Fetch Test = http://config.privoxy.org/show-status?file=invalid
490 # Fetch Test = http://config.privoxy.org/show-status?file=trust
491 # Fetch Test = http://p.p/show-version
492 # Fetch Test = http://p.p/show-request
493 # Fetch Test = http://p.p/show-url-info
494 # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F
495 # Fetch Test = http://p.p/show-url-info?url=http:%2F%2Fwww.privoxy.org%2F
496 # Fetch Test = http://p.p/show-url-info?url=https:%2F%2Fwww.privoxy.org%2F
497 # Fetch Test = http://p.p/show-url-info?url=ftp:%2F%2Fwww.privoxy.org%2F
498 # Fetch Test = http://p.p/show-url-info?url=
499 # Fetch Test = http://p.p/show-url-info?url=%2F
500 # Fetch Test = http://p.p/toggle
501 # Fetch Test = http://p.p/edit-actions
502 # Fetch Test = http://p.p/eaa
503 # Fetch Test = http://p.p/eau
504 # Fetch Test = http://p.p/ear
505 # Fetch Test = http://p.p/eal
506 # Fetch Test = http://p.p/eafu
507 # Fetch Test = http://p.p/eas
508 # Fetch Test = http://p.p/easa
509 # Fetch Test = http://p.p/easr
510 # Fetch Test = http://p.p/eass
511 # Fetch Test = http://p.p/edit-actions-for-url
512 # Fetch Test = http://p.p/edit-actions-list
513 # Fetch Test = http://p.p/edit-actions-submit
514 # Fetch Test = http://p.p/edit-actions-url
515 # Fetch Test = http://p.p/edit-actions-url-form
516 # Fetch Test = http://p.p/edit-actions-add-url
517 # Fetch Test = http://p.p/edit-actions-add-url-form
518 # Fetch Test = http://p.p/edit-actions-remove-url
519 # Fetch Test = http://p.p/edit-actions-remove-url-form
520 # Fetch Test = http://p.p/edit-actions-section-add
521 # Fetch Test = http://p.p/edit-actions-section-remove
522 # Fetch Test = http://p.p/edit-actions-section-swap
523 # Fetch Test = http://p.p/error-favicon.ico
524 # Fetch Test = http://p.p/favicon.ico
525 # Fetch Test = http://p.p/robots.txt
526 # Fetch Test = http://p.p/send-banner
527 # Fetch Test = http://p.p/send-stylesheet
528 # Fetch Test = http://p.p/t
529 # Fetch Test = http://p.p/url-info-osd.xml
531 # Trusted CGI Request = http://p.p/edit-actions
532 # Expect Status Code = 302
533 # Level = 12 # Depends on the CGI editor being enabled
534 # Fetch Test = http://p.p/does-not-exist
535 # Expect Status Code = 404
536 # Trusted CGI Request = http://p.p/eaa
537 # Trusted CGI Request = http://p.p/eau
538 # Trusted CGI Request = http://p.p/ear
539 # Trusted CGI Request = http://p.p/eal
540 # Trusted CGI Request = http://p.p/eafu
541 # Trusted CGI Request = http://p.p/eas
542 # Trusted CGI Request = http://p.p/easa
543 # Trusted CGI Request = http://p.p/easr
544 # Trusted CGI Request = http://p.p/eass
545 # Trusted CGI Request = http://p.p/edit-actions-for-url
546 # Trusted CGI Request = http://p.p/edit-actions-list
547 # Trusted CGI Request = http://p.p/edit-actions-submit
548 # Trusted CGI Request = http://p.p/edit-actions-url
549 # Trusted CGI Request = http://p.p/edit-actions-url-form
550 # Trusted CGI Request = http://p.p/edit-actions-add-url
551 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
552 # Trusted CGI Request = http://p.p/edit-actions-remove-url
553 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
554 # Trusted CGI Request = http://p.p/edit-actions-section-add
555 # Trusted CGI Request = http://p.p/edit-actions-section-remove
556 # Trusted CGI Request = http://p.p/edit-actions-section-swap
557 # Trusted CGI Request = http://p.p/send-stylesheet
559 # The following tests depend on Privoxy being configured to deliver the user manual
561 # Fetch Test = http://p.p/user-manual
562 # Expect Status Code = 302
564 # Fetch Test = http://p.p/user-manual/
566 # Fetch Test = http://p.p/user-manual/actions-file.html
568 # Fetch Test = http://p.p/user-manual/appendix.html
570 # Fetch Test = http://p.p/user-manual/config.html
572 # Fetch Test = http://p.p/user-manual/configuration.html
574 # Fetch Test = http://p.p/user-manual/contact.html
576 # Fetch Test = http://p.p/user-manual/copyright.html
578 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
580 # Fetch Test = http://p.p/user-manual/filter-file.html
582 # Fetch Test = http://p.p/user-manual/index.html
584 # Fetch Test = http://p.p/user-manual/installation.html
586 # Fetch Test = http://p.p/user-manual/introduction.html
588 # Fetch Test = http://p.p/user-manual/p_doc.css
590 # Fetch Test = http://p.p/user-manual/proxy2.jpg
592 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
594 # Fetch Test = http://p.p/user-manual/quickstart.html
596 # Fetch Test = http://p.p/user-manual/seealso.html
598 # Fetch Test = http://p.p/user-manual/startup.html
600 # Fetch Test = http://p.p/user-manual/templates.html
602 # Fetch Test = http://p.p/user-manual/upgradersnote.html
604 # Fetch Test = http://p.p/user-manual/whatsnew.html
608 # Method Test = OPTIONS
615 # Method Test = DELETE
616 # Method Test = OPTIONS
617 # Method Test = TRACE
618 # Method Test = CONNECT
619 # Method Test = PROPFIND
620 # Method Test = PROPPATCH
623 # Method Test = MKCOL
625 # Method Test = UNLOCK
626 # Method Test = BCOPY
627 # Method Test = BMOVE
628 # Method Test = BDELETE
629 # Method Test = BPROPFIND
630 # Method Test = BPROPPATCH
631 # Method Test = SUBSCRIBE
632 # Method Test = UNSUBSCRIBE
633 # Method Test = NOTIFY
635 # Method Test = VERSION-CONTROL
636 # Method Test = REPORT
637 # Method Test = CHECKOUT
638 # Method Test = CHECKIN
639 # Method Test = UNCHECKOUT
640 # Method Test = MKWORKSPACE
641 # Method Test = UPDATE
642 # Method Test = LABEL
643 # Method Test = MERGE
644 # Method Test = BASELINE-CONTROL
645 # Method Test = MKACTIVITY
646 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
647 # Expect Status Code = 400
649 {+block{Forbidden Port. You are not supposed to see this.}}
650 config.privoxy.org:1-/
654 config.privoxy.org:3,79-81/
657 # 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
658 # Expect Status Code = 503
659 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
660 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 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
663 # Expect Status Code = 503
664 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
665 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
667 # This one currently triggers the same error condition as the
668 # test above (socks5 server unreachable), but once Privoxy
669 # starts to properly reject invalid ports it should become useful.
671 # Fetch Test = http://invalid-forward5-gateway-port.example
672 # Expect Status Code = 503
673 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
674 invalid-forward5-gateway-port.example
676 # Fetch Test = http://forward5-null-gateway-host.example
677 # Expect Status Code = 503
678 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
679 forward5-null-gateway-host.example
681 # Fetch Test = http://www.forbidden-connect.example:444/
683 # Expect Status Code = 403
684 {+limit-connect{443}}
685 www.forbidden-connect.example/
687 # Fetch Test = http://www.blocked-request.example/blocked-request
688 # Expect Status Code = 403
689 {+block{This request failed to make it to the target destination which means the test succeeded.}}
690 www.blocked-request.example/blocked-request
692 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
693 # Expect Status Code = 403
695 www.blocked-request.example/blocked-request-with-no-reason-specified
697 # Just in case there is no white-space fuzzer in the house ...
699 # Set Header = X-LWS-Test: no superfluous white space here
700 # Expect Header = NO CHANGE
701 # Set Header = X-LWS-Test: superfluous white space in the house
702 # Expect Header = X-LWS-Test: superfluous white space in the house
703 # Set Header = X-LWS-Test : superfluous white space in the house
704 # Expect Header = X-LWS-Test: superfluous white space in the house
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: :no superfluous white space here
708 # Expect Header = NO CHANGE
709 # Set Header = X-LWS-Test: superfluous white tabs in the house
710 # Expect Header = X-LWS-Test: superfluous white tabs in the house
711 # Set Header = X-LWS-Test : superfluous white tabs in the house
712 # Expect Header = X-LWS-Test: superfluous white tabs in the house
713 # Set Header = X-LWS-Test: "leave quoted lws alone"
714 # Expect Header = X-LWS-Test: "leave quoted lws alone"
715 # Set Header = X-LWS-Test: "leave quoted lws alone" thxbye
716 # Expect Header = X-LWS-Test: "leave quoted lws alone" thxbye
717 # Set Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
718 # Expect Header = X-LWS-Test: " Do I Look like quoted text? Me thinks not.
719 # Set Header = X-LWS-Test: "This is quoted" this is not "but this is again"
720 # Expect Header = X-LWS-Test: "This is quoted" this is not "but this is again"
721 # Set Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not
722 # Expect Header = X-LWS-Test: "This is quoted" this is not "this is " but " this again is not