summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-09-13 22:57:38 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-09-13 22:57:38 +0200
commit775cc1be66b7dd7994480bcb6d6a0fbf43620a96 (patch)
tree00a5c6d2ee6c16b31a65d8cf57d9cf5532b2680e /lib/url.c
parentf05e51362f310cb04b0ad8d086b9cf693aad5c9d (diff)
downloadcurl-775cc1be66b7dd7994480bcb6d6a0fbf43620a96.tar.gz
parse_proxy: treat "socks://x" as a socks4 proxy
Selected socks proxy in Google's Chrome browser. Resulting in the following environment variables: NO_PROXY=localhost,127.0.0.0/8 ALL_PROXY=socks://localhost:1080/ all_proxy=socks://localhost:1080/ no_proxy=localhost,127.0.0.0/8 ... and libcurl didn't treat 'socks://' as socks but instead picked HTTP proxy. Reported by: Scott Bailey Bug: http://curl.haxx.se/bug/view.cgi?id=3566860
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index c05c50e62..8bbd3e478 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4249,7 +4249,7 @@ static CURLcode parse_proxy(struct SessionHandle *data,
conn->proxytype = CURLPROXY_SOCKS5;
else if(checkprefix("socks4a", proxy))
conn->proxytype = CURLPROXY_SOCKS4A;
- else if(checkprefix("socks4", proxy))
+ else if(checkprefix("socks4", proxy) || checkprefix("socks", proxy))
conn->proxytype = CURLPROXY_SOCKS4;
/* Any other xxx:// : change to http proxy */
}