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
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;