summaryrefslogtreecommitdiff
path: root/lib/conncache.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-27 11:51:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-29 23:32:17 +0200
commit1801bdbd4ccd86816c2c5626e93ac6773f126f74 (patch)
tree874cad4f2adc82010f495c791d974fedfc1ce111 /lib/conncache.c
parentd618986a1cbaf5826dbb12fe0544c645906810a6 (diff)
downloadcurl-1801bdbd4ccd86816c2c5626e93ac6773f126f74.tar.gz
build: disable more code/data when built without proxy supportbagder/strip-more-disabled-proxy
Added build to travis to verify
Diffstat (limited to 'lib/conncache.c')
-rw-r--r--lib/conncache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/conncache.c b/lib/conncache.c
index 95fcea6f3..67f442b7c 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -143,12 +143,15 @@ static void hashkey(struct connectdata *conn, char *buf,
const char *hostname;
long port = conn->remote_port;
+#ifndef CURL_DISABLE_PROXY
if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
hostname = conn->http_proxy.host.name;
port = conn->port;
}
- else if(conn->bits.conn_to_host)
- hostname = conn->conn_to_host.name;
+ else
+#endif
+ if(conn->bits.conn_to_host)
+ hostname = conn->conn_to_host.name;
else
hostname = conn->host.name;