aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-09-14 14:05:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-09-14 14:05:01 +0000
commit86ff2c46b73a2bbcd25edaf6a3c1d62c8a85f29d (patch)
tree323a2c756ca245619466eb55810904e9eae2d487 /lib/url.c
parentbe8b2a1e30d1066f85daff7a0d0a92910e50c089 (diff)
introduced 'tunnel through http proxy' for ftp
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 4b67717a9..0f2dbfb0a 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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;