]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
connections: non-HTTP proxies on different ports aren't reused either
authorDaniel Stenberg <daniel@haxx.se>
Mon, 2 May 2016 21:15:05 +0000 (23:15 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 3 May 2016 06:18:15 +0000 (08:18 +0200)
Reported-by: Oleg Pudeyev and fuchaoqun
Fixes #648

lib/conncache.c
lib/url.c

index 930b932b71507af55530ce0e674eccefdbe51b9c..d0c09c826d92ffa5b2bc75acd063c423bfa5bcf2 100644 (file)
@@ -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
index b1453e697db73713d01c98c22fcc3f02066e88f8..70ccd0f82ed2bfd979239f2f26d77184d3c64ce8 100644 (file)
--- 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) &&