1 #############################################################################
2 # $Id: regression-tests.action,v 1.65 2008/04/24 16:28:32 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=
498 # Fetch Test = http://p.p/show-url-info?url=%2F
499 # Fetch Test = http://p.p/toggle
500 # Fetch Test = http://p.p/edit-actions
501 # Fetch Test = http://p.p/eaa
502 # Fetch Test = http://p.p/eau
503 # Fetch Test = http://p.p/ear
504 # Fetch Test = http://p.p/eal
505 # Fetch Test = http://p.p/eafu
506 # Fetch Test = http://p.p/eas
507 # Fetch Test = http://p.p/easa
508 # Fetch Test = http://p.p/easr
509 # Fetch Test = http://p.p/eass
510 # Fetch Test = http://p.p/edit-actions-for-url
511 # Fetch Test = http://p.p/edit-actions-list
512 # Fetch Test = http://p.p/edit-actions-submit
513 # Fetch Test = http://p.p/edit-actions-url
514 # Fetch Test = http://p.p/edit-actions-url-form
515 # Fetch Test = http://p.p/edit-actions-add-url
516 # Fetch Test = http://p.p/edit-actions-add-url-form
517 # Fetch Test = http://p.p/edit-actions-remove-url
518 # Fetch Test = http://p.p/edit-actions-remove-url-form
519 # Fetch Test = http://p.p/edit-actions-section-add
520 # Fetch Test = http://p.p/edit-actions-section-remove
521 # Fetch Test = http://p.p/edit-actions-section-swap
522 # Fetch Test = http://p.p/error-favicon.ico
523 # Fetch Test = http://p.p/favicon.ico
524 # Fetch Test = http://p.p/robots.txt
525 # Fetch Test = http://p.p/send-banner
526 # Fetch Test = http://p.p/send-stylesheet
527 # Fetch Test = http://p.p/t
528 # Trusted CGI Request = http://p.p/edit-actions
529 # Expect Status Code = 302
530 # Level = 12 # Depends on the CGI editor being enabled
531 # Fetch Test = http://p.p/does-not-exist
532 # Expect Status Code = 404
533 # Trusted CGI Request = http://p.p/eaa
534 # Trusted CGI Request = http://p.p/eau
535 # Trusted CGI Request = http://p.p/ear
536 # Trusted CGI Request = http://p.p/eal
537 # Trusted CGI Request = http://p.p/eafu
538 # Trusted CGI Request = http://p.p/eas
539 # Trusted CGI Request = http://p.p/easa
540 # Trusted CGI Request = http://p.p/easr
541 # Trusted CGI Request = http://p.p/eass
542 # Trusted CGI Request = http://p.p/edit-actions-for-url
543 # Trusted CGI Request = http://p.p/edit-actions-list
544 # Trusted CGI Request = http://p.p/edit-actions-submit
545 # Trusted CGI Request = http://p.p/edit-actions-url
546 # Trusted CGI Request = http://p.p/edit-actions-url-form
547 # Trusted CGI Request = http://p.p/edit-actions-add-url
548 # Trusted CGI Request = http://p.p/edit-actions-add-url-form
549 # Trusted CGI Request = http://p.p/edit-actions-remove-url
550 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form
551 # Trusted CGI Request = http://p.p/edit-actions-section-add
552 # Trusted CGI Request = http://p.p/edit-actions-section-remove
553 # Trusted CGI Request = http://p.p/edit-actions-section-swap
554 # Trusted CGI Request = http://p.p/send-stylesheet
556 # The following tests depend on Privoxy being configured to deliver the user manual
558 # Fetch Test = http://p.p/user-manual
559 # Expect Status Code = 302
561 # Fetch Test = http://p.p/user-manual/
563 # Fetch Test = http://p.p/user-manual/actions-file.html
565 # Fetch Test = http://p.p/user-manual/appendix.html
567 # Fetch Test = http://p.p/user-manual/config.html
569 # Fetch Test = http://p.p/user-manual/configuration.html
571 # Fetch Test = http://p.p/user-manual/contact.html
573 # Fetch Test = http://p.p/user-manual/copyright.html
575 # Fetch Test = http://p.p/user-manual/files-in-use.jpg
577 # Fetch Test = http://p.p/user-manual/filter-file.html
579 # Fetch Test = http://p.p/user-manual/index.html
581 # Fetch Test = http://p.p/user-manual/installation.html
583 # Fetch Test = http://p.p/user-manual/introduction.html
585 # Fetch Test = http://p.p/user-manual/p_doc.css
587 # Fetch Test = http://p.p/user-manual/proxy2.jpg
589 # Fetch Test = http://p.p/user-manual/proxy_setup.jpg
591 # Fetch Test = http://p.p/user-manual/quickstart.html
593 # Fetch Test = http://p.p/user-manual/seealso.html
595 # Fetch Test = http://p.p/user-manual/startup.html
597 # Fetch Test = http://p.p/user-manual/templates.html
599 # Fetch Test = http://p.p/user-manual/upgradersnote.html
601 # Fetch Test = http://p.p/user-manual/whatsnew.html
605 # Method Test = OPTIONS
612 # Method Test = DELETE
613 # Method Test = OPTIONS
614 # Method Test = TRACE
615 # Method Test = CONNECT
616 # Method Test = PROPFIND
617 # Method Test = PROPPATCH
620 # Method Test = MKCOL
622 # Method Test = UNLOCK
623 # Method Test = BCOPY
624 # Method Test = BMOVE
625 # Method Test = BDELETE
626 # Method Test = BPROPFIND
627 # Method Test = BPROPPATCH
628 # Method Test = SUBSCRIBE
629 # Method Test = UNSUBSCRIBE
630 # Method Test = NOTIFY
632 # Method Test = VERSION-CONTROL
633 # Method Test = REPORT
634 # Method Test = CHECKOUT
635 # Method Test = CHECKIN
636 # Method Test = UNCHECKOUT
637 # Method Test = MKWORKSPACE
638 # Method Test = UPDATE
639 # Method Test = LABEL
640 # Method Test = MERGE
641 # Method Test = BASELINE-CONTROL
642 # Method Test = MKACTIVITY
643 # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
644 # Expect Status Code = 400
646 {+block{Forbidden Port. You are not supposed to see this.}}
647 config.privoxy.org:1-/
651 config.privoxy.org:3,79-81/
654 # 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
655 # Expect Status Code = 503
656 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
657 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/
659 # Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
660 # Expect Status Code = 503
661 {+forward-override{forward-socks5 127.0.0.1:12345 .}}
662 oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
664 # This one currently triggers the same error condition as the
665 # test above (socks5 server unreachable), but once Privoxy
666 # starts to properly reject invalid ports it should become useful.
668 # Fetch Test = http://invalid-forward5-gateway-port.example
669 # Expect Status Code = 503
670 {+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
671 invalid-forward5-gateway-port.example
673 # Fetch Test = http://forward5-null-gateway-host.example
674 # Expect Status Code = 503
675 {+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
676 forward5-null-gateway-host.example
678 # Fetch Test = http://www.forbidden-connect.example:444/forbidden-connect
680 # Expect Status Code = 403
681 {+limit-connect{443}}
682 www.forbidden-connect.example/forbidden-connect
684 # Fetch Test = http://www.blocked-request.example/blocked-request
685 # Expect Status Code = 403
686 {+block{This request failed to make it to the target destination which means the test succeeded.}}
687 www.blocked-request.example/blocked-request
689 # Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
690 # Expect Status Code = 403
692 www.blocked-request.example/blocked-request-with-no-reason-specified