From: Daniel Stenberg Date: Mon, 2 May 2016 21:15:05 +0000 (+0200) Subject: connections: non-HTTP proxies on different ports aren't reused either X-Git-Tag: curl-7_49_0~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5823179;p=thirdparty%2Fcurl.git connections: non-HTTP proxies on different ports aren't reused either Reported-by: Oleg Pudeyev and fuchaoqun Fixes #648 --- diff --git a/lib/conncache.c b/lib/conncache.c index 930b932b71..d0c09c826d 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -140,7 +140,7 @@ static char *hashkey(struct connectdata *conn) else hostname = conn->host.name; - return aprintf("%s:%d", hostname, conn->localport); + return aprintf("%s:%d", hostname, conn->port); } /* Look up the bundle with all the connections to the same host this diff --git a/lib/url.c b/lib/url.c index b1453e697d..70ccd0f82e 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3376,7 +3376,7 @@ ConnectionExists(struct SessionHandle *data, } } - if(!needle->bits.httpproxy || (needle->handler->flags&PROTOPT_SSL) || + if(!needle->bits.proxy || (needle->handler->flags&PROTOPT_SSL) || (needle->bits.httpproxy && check->bits.httpproxy && needle->bits.tunnel_proxy && check->bits.tunnel_proxy && Curl_raw_equal(needle->proxy.name, check->proxy.name) &&