]> granicus.if.org Git - curl/commitdiff
Frankie Fong filed bug report #708708 which identified a problem with
authorDaniel Stenberg <daniel@haxx.se>
Mon, 31 Mar 2003 03:42:01 +0000 (03:42 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 31 Mar 2003 03:42:01 +0000 (03:42 +0000)
ConnectionExists() when first doing a proxy connecto to a HTTPS site and then
switching over to a HTTP connection to the same host.

This fix corrects the problem.

lib/url.c

index 2d8d9491c121b59781792da742f78ccedeed0d4c..8a61d05ae80812061bbd1970362da4bd993033fb 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1272,6 +1272,11 @@ ConnectionExists(struct SessionHandle *data,
     if(!check)
       /* NULL pointer means not filled-in entry */
       continue;
+
+    if((needle->protocol&PROT_SSL) != (check->protocol&PROT_SSL))
+      /* 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. */