aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-08-07 22:59:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-08-07 22:59:06 +0000
commit493d6033aa299b614f0edecd86e1eccf95a86a00 (patch)
tree3de57b6ace09cb6063830cfa319db2dd2725a329 /lib
parent8f219af884dcb330d96d71928c9bbdd003919b4b (diff)
Jon Grubbs filed bug report #1249962 which identified a problem with NTLM on a
HTTP proxy if an FTP URL was given. libcurl now properly switches to pure HTTP internally when an HTTP proxy is used, even for FTP URLs. The problem would also occur with other multi-pass auth methods.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index f587b79f1..3698affd1 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2651,9 +2651,13 @@ static CURLcode CreateConnection(struct SessionHandle *data,
}
if(proxy && *proxy) {
+ long bits = conn->protocol & (PROT_HTTPS|PROT_SSL);
data->change.proxy = proxy;
data->change.proxy_alloc=TRUE; /* this needs to be freed later */
conn->bits.httpproxy = TRUE;
+
+ /* force this to become HTTP */
+ conn->protocol = PROT_HTTP | bits;
}
} /* if (!nope) - it wasn't specified non-proxy */
} /* NO_PROXY wasn't specified or '*' */
@@ -2789,6 +2793,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
#ifndef CURL_DISABLE_HTTP
conn->curl_do = Curl_http;
conn->curl_done = Curl_http_done;
+ conn->protocol = PROT_HTTP; /* switch to HTTP */
#else
failf(data, "FTP over http proxy requires HTTP support built-in!");
return CURLE_UNSUPPORTED_PROTOCOL;