aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index ac3399b9e..d37fe6dfc 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4812,8 +4812,11 @@ static CURLcode create_conn(struct SessionHandle *data,
/* asking for a HTTP proxy is a bit funny when HTTP is disabled... */
return CURLE_UNSUPPORTED_PROTOCOL;
#else
- /* force this connection's protocol to become HTTP */
- conn->handler = &Curl_handler_http;
+ /* force this connection's protocol to become HTTP if not already
+ compatible */
+ if(!(conn->handler->protocol & CURLPROTO_HTTP))
+ conn->handler = &Curl_handler_http;
+
conn->bits.httpproxy = TRUE;
#endif
}