#############################################################################
-# $Id: regression-tests.action,v 1.52 2008/01/17 19:38:17 fk Exp $
+# $Id: regression-tests.action,v 1.58 2008/02/24 19:28:01 fk Exp $
#############################################################################
#
# This is a configuration file for Privoxy-Regression-Test.
#############################################################################
{{settings}}
-for-privoxy-version=3.0.7
+for-privoxy-version=3.0.9
+
+# Some dependencies Privoxy-Regression-Test should know about:
+#
+# Level 9 needs = config line user-manual\s+/
+# Level 12 needs = config line enable-edit-actions\s+1
#######################################################
# Enable taggers to activate the tests on demand
# Set Header = Accept-Language: de-de
# Expect Header = Accept-Language: en-gb
{+hide-accept-language{en-gb}}
-TAG:^hideaccept-language\{en-gb\}$
+TAG:^hide-accept-language\{en-gb\}$
# Set Header = Accept-Language: de-de
# Expect Header = REMOVAL
#
# Set Header = Host: p.p
# Expect Header = NO CHANGE
+#
+# Set Header = Referer: http://config.privoxy.org.ad356ef8e87a89e6c898b74500d58607ac691178.exit/foo/baaz.html
+# Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
{+client-header-filter{hide-tor-exit-notation} -hide-referer}
TAG:^client-header-filter\{hide-tor-exit-notation\}$
{}
TAG:^Proxy-Connection removal$
-# Set Header = proxy-connection: keep-alive
+# Set Header = Proxy-Connection: keep-alive
# Expect Header = REMOVAL
{}
TAG:^Proxy-Connection removal$
# Method Test = OPTIONS
# Method Test = GET
+# Method Test = get
+# Method Test = gEt
# Method Test = HEAD
# Method Test = POST
# Method Test = PUT
# Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE
# Expect Status Code = 400
-{+block}
+{+block{Forbidden Port. You are not supposed to see this.}}
config.privoxy.org:1-/
p.p:1-/
config.privoxy.org:3,79-81/
p.p:3,22,79-81/
+# 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
+# Expect Status Code = 503
+{+forward-override{forward-socks5 127.0.0.1:12345 .}}
+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/
+
+# Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
+# Expect Status Code = 503
+{+forward-override{forward-socks5 127.0.0.1:12345 .}}
+oh-dear-this-hostname-is-short-enough-but-there-is-no-socks-server-listening.example
+
+# This one currently triggers the same error condition as the
+# test above (socks5 server unreachable), but once Privoxy
+# starts to properly reject invalid ports it should become useful.
+
+# Fetch Test = http://invalid-forward5-gateway-port.example
+# Expect Status Code = 503
+{+forward-override{forward-socks5 127.0.0.1:-1 127.0.0.1:12345}}
+invalid-forward5-gateway-port.example
+
+# Fetch Test = http://forward5-null-gateway-host.example
+# Expect Status Code = 503
+{+forward-override{forward-socks5 :12345 127.0.0.1:12345}}
+forward5-null-gateway-host.example
+
+# Fetch Test = http://www.forbidden-connect.example:444/forbidden-connect
+# Method = CONNECT
+# Expect Status Code = 403
+{+limit-connect{443} \
+ -treat-forbidden-connects-like-blocks \
+}
+www.forbidden-connect.example/forbidden-connect
+
+# Fetch Test = http://www.forbidden-connect.example:444/forbidden-connect-treated-as-block
+# Method = CONNECT
+# Expect Status Code = 403
+{+limit-connect{443} \
+ +treat-forbidden-connects-like-blocks \
+}
+www.forbidden-connect.example/forbidden-connect-treated-as-block
+
+# Fetch Test = http://www.blocked-request.example/blocked-request
+# Expect Status Code = 403
+{+block{This request failed to make it to the target destination which means the test succeeded.}}
+www.blocked-request.example/blocked-request
+
+# Fetch Test = http://www.blocked-request.example/blocked-request-with-no-reason-specified
+# Expect Status Code = 403
+{+block}
+www.blocked-request.example/blocked-request-with-no-reason-specified