aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/url.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 2c5cb39b8..42e1756f9 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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;