proxy: allow socks:// prefix in proxy string

Inspired by a patch from OB.Conseil. Added test case 708 to verify.
This commit is contained in:
Daniel Stenberg
2011-04-27 14:44:00 +02:00
parent 2cbe885c1a
commit 3b1b26578f
5 changed files with 112 additions and 47 deletions

View File

@@ -385,7 +385,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
curl_socket_t sock = conn->sock[sockindex];
struct SessionHandle *data = conn->data;
long timeout;
bool socks5_resolve_local = (bool)(data->set.proxytype == CURLPROXY_SOCKS5);
bool socks5_resolve_local = (bool)(conn->proxytype == CURLPROXY_SOCKS5);
const size_t hostname_len = strlen(hostname);
ssize_t packetsize = 0;