From 93290f69d0258ddc7da7d034937f17334fe943b1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 17 Mar 2011 11:45:58 +0100 Subject: connection setup: if HTTP is disabled asking for HTTP proxy is bad --- lib/url.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 5faefd931..ecb3d33bb 100644 --- a/lib/url.c +++ b/lib/url.c @@ -4832,9 +4832,14 @@ static CURLcode create_conn(struct SessionHandle *data, if(proxy && !(conn->handler->flags & PROTOPT_BANPROXY)) { if((conn->proxytype == CURLPROXY_HTTP) || (conn->proxytype == CURLPROXY_HTTP_1_0)) { +#ifdef CURL_DISABLE_HTTP + /* 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; conn->bits.httpproxy = TRUE; +#endif } conn->bits.proxy = TRUE; } -- cgit v1.2.3