aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-03-17 11:45:58 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-03-17 11:45:58 +0100
commit93290f69d0258ddc7da7d034937f17334fe943b1 (patch)
tree6697378d2d24ccfd68fd7a4906a7ca82915b055f /lib
parente38a7880e14ef7f706e5d8d2bf8bb00c7aa98808 (diff)
connection setup: if HTTP is disabled asking for HTTP proxy is bad
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c5
1 files changed, 5 insertions, 0 deletions
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;
}