Add tests for missing socks4 and socks4a forwarders
authorFabian Keil <fk@fabiankeil.de>
Sat, 30 Jul 2011 15:22:39 +0000 (15:22 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sat, 30 Jul 2011 15:22:39 +0000 (15:22 +0000)
The code paths are different than for socks5 and the recent
memory leak in socks5_connect() was only detected due to the
already existing test.

Currently no such leaks exist in socks4_connect() but I may
add some in the future and would prefer to know about it.

regression-tests.action

index 1af1623..cb4184d 100644 (file)
@@ -1,5 +1,5 @@
 #############################################################################
-# $Id: regression-tests.action,v 1.34 2011/03/08 18:33:28 fabiankeil Exp $
+# $Id: regression-tests.action,v 1.35 2011/06/23 14:03:38 fabiankeil Exp $
 #############################################################################
 #
 # This is a configuration file for Privoxy-Regression-Test
@@ -751,10 +751,20 @@ p.p:3,22,79-81/
 {+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
+# Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-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
+oh-dear-this-hostname-is-short-enough-but-there-is-no-socks5-server-listening.example
+
+# Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
+# Expect Status Code = 503
+{+forward-override{forward-socks4 127.0.0.1:12345 .}}
+oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4-server-listening.example
+
+# Fetch Test = http://oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
+# Expect Status Code = 503
+{+forward-override{forward-socks4a 127.0.0.1:12345 .}}
+oh-dear-this-hostname-is-short-enough-but-there-is-no-socks4a-server-listening.example
 
 # This one currently triggers the same error condition as the
 # test above (socks5 server unreachable), but once Privoxy