diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-10-23 21:00:51 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-10-23 21:00:51 +0000 |
commit | 949ff9715a55886ab13fd6cb59d4b4043d457793 (patch) | |
tree | e40ea1d624d1ec57101c7f75d8918cb288f73ab6 /lib | |
parent | b9a305983fad324a722f8865a4f4d22535ab6c84 (diff) |
Bug report #1812190 (http://curl.haxx.se/bug/view.cgi?id=1812190) points out
that libcurl tried to re-use connections a bit too much when using non-SSL
protocols tunneled over a HTTP proxy.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -2399,14 +2399,18 @@ ConnectionExists(struct SessionHandle *data, /* don't do mixed SSL and non-SSL connections */ continue; - if(!needle->bits.httpproxy || needle->protocol&PROT_SSL) { - /* The requested connection does not use a HTTP proxy or it - uses SSL. */ + if(needle->bits.proxy != check->bits.proxy) + /* don't do mixed proxy and non-proxy connections */ + continue; - if(!(needle->protocol&PROT_SSL) && check->bits.httpproxy) - /* we don't do SSL but the cached connection has a proxy, - then don't match this */ - continue; + if(!needle->bits.httpproxy || needle->protocol&PROT_SSL || + (needle->bits.httpproxy && check->bits.httpproxy && + needle->bits.tunnel_proxy && check->bits.tunnel_proxy && + strequal(needle->proxy.name, check->proxy.name) && + (needle->port == check->port))) { + /* The requested connection does not use a HTTP proxy or it uses SSL or + it is a non-SSL protocol tunneled over the same http proxy name and + port number */ if(strequal(needle->protostr, check->protostr) && strequal(needle->host.name, check->host.name) && |