diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-12-09 22:51:08 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-12-09 22:51:08 +0100 |
commit | 07e3b7512c9a2723daac046501c7ea40ede4bd28 (patch) | |
tree | b66813c6dca13e3e21ac74a1508465fb550f1fc1 | |
parent | 50d88bf4b54114872c78f3d7e34c43cdffa2f69a (diff) |
create_conn: don't switch to HTTP protocol if tunneling is enabled
This is a regression since who knows when. When spotting that a HTTP
proxy is used we must not uncondititionally enable the HTTP protocol
since if we do tunneling through the proxy we're still using the target
protocol.
Reported by: Naveen Chandran
-rw-r--r-- | lib/url.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4900,8 +4900,9 @@ static CURLcode create_conn(struct SessionHandle *data, return CURLE_UNSUPPORTED_PROTOCOL; #else /* force this connection's protocol to become HTTP if not already - compatible */ - if(!(conn->handler->protocol & CURLPROTO_HTTP)) + compatible - if it isn't tunneling through */ + if(!(conn->handler->protocol & CURLPROTO_HTTP) && + !conn->bits.tunnel_proxy) conn->handler = &Curl_handler_http; conn->bits.httpproxy = TRUE; |