diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-09-29 21:46:04 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-09-29 21:46:04 +0000 |
commit | f3ab5d5500f81b052e215b60fe55dcf88fe6635f (patch) | |
tree | be1cf923eeb5eca48d2e66404a0506ca92f874a2 /lib/url.c | |
parent | 8f467b4288b69e0cd2355cdb8d4dd8356950e447 (diff) |
- Daniel Egger provided a patch that allows you to disable proxy support in
libcurl to somewhat reduce the size of the binary. Run configure
--disable-proxy.
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -2666,17 +2666,14 @@ static CURLcode ConnectPlease(struct SessionHandle *data, result = Curl_store_ip_addr(conn); if(CURLE_OK == result) { - switch(data->set.proxytype) { +#ifndef CURL_DISABLE_PROXY case CURLPROXY_SOCKS5: case CURLPROXY_SOCKS5_HOSTNAME: result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, conn->host.name, conn->remote_port, FIRSTSOCKET, conn); break; - case CURLPROXY_HTTP: - /* do nothing here. handled later. */ - break; case CURLPROXY_SOCKS4: result = Curl_SOCKS4(conn->proxyuser, conn->host.name, conn->remote_port, FIRSTSOCKET, conn, FALSE); @@ -2685,6 +2682,10 @@ static CURLcode ConnectPlease(struct SessionHandle *data, result = Curl_SOCKS4(conn->proxyuser, conn->host.name, conn->remote_port, FIRSTSOCKET, conn, TRUE); break; +#endif /* CURL_DISABLE_PROXY */ + case CURLPROXY_HTTP: + /* do nothing here. handled later. */ + break; default: failf(data, "unknown proxytype option given"); result = CURLE_COULDNT_CONNECT; @@ -3237,6 +3238,7 @@ static CURLcode setup_connection_internals(struct SessionHandle *data, return CURLE_UNSUPPORTED_PROTOCOL; } +#ifndef CURL_DISABLE_PROXY /**************************************************************** * Detect what (if any) proxy to use. Remember that this selects a host * name and is not limited to HTTP proxies only. @@ -3513,6 +3515,7 @@ static CURLcode parse_proxy_auth(struct SessionHandle *data, return CURLE_OK; } +#endif /* CURL_DISABLE_PROXY */ /* * @@ -4040,6 +4043,7 @@ static CURLcode create_conn(struct SessionHandle *data, return result; } +#ifndef CURL_DISABLE_PROXY /************************************************************* * Extract the user and password from the authentication string *************************************************************/ @@ -4068,6 +4072,7 @@ static CURLcode create_conn(struct SessionHandle *data, proxy = NULL; } /* proxy must be freed later unless NULL */ +#endif /* CURL_DISABLE_PROXY */ /************************************************************* * No protocol part in URL was used, add it! |