diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-09-14 14:05:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-09-14 14:05:01 +0000 |
commit | 86ff2c46b73a2bbcd25edaf6a3c1d62c8a85f29d (patch) | |
tree | 323a2c756ca245619466eb55810904e9eae2d487 /lib/url.c | |
parent | be8b2a1e30d1066f85daff7a0d0a92910e50c089 (diff) |
introduced 'tunnel through http proxy' for ftp
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -437,6 +437,9 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...) data->proxy = va_arg(param, char *); data->bits.httpproxy = data->proxy?1:0; break; + case CURLOPT_HTTPPROXYTUNNEL: + data->bits.tunnel_thru_httpproxy = va_arg(param, long)?TRUE:FALSE; + break; case CURLOPT_PROXYPORT: data->proxyport = va_arg(param, long); break; @@ -619,6 +622,7 @@ CURLcode curl_disconnect(CURLconnect *c_connect) return CURLE_OK; } + /* * NAME curl_connect() * @@ -948,7 +952,10 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect) data->remote_port = PORT_FTP; conn->protocol |= PROT_FTP; - if(data->bits.httpproxy) { + if(data->bits.httpproxy && + !data->bits.tunnel_thru_httpproxy) { + /* Unless we have asked to tunnel ftp operations through the proxy, we + switch and use HTTP operations only */ conn->curl_do = http; conn->curl_done = http_done; conn->curl_close = http_close; |