cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1812190 ] libcurl can use wrong connection, when using https

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 22 Oct 2007 02:54:03 -0700

Bugs item #1812190, was opened at 2007-10-12 13:45
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1812190&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mikhail (gibigaba)
Assigned to: Daniel Stenberg (bagder)
Summary: libcurl can use wrong connection, when using https

Initial Comment:
libcurl in some cases use wrong connection, when connected to different https servers(or one server and different ports) via same proxy.

following changes to url.c can fix the problem:

C:\...\home\Mikhail\inst\curl-7.17.0-hacked\lib>diff ..\..\curl-7.17.0\lib\url.c url.c
2219,2223c2219
< 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))) {

---
>     if(!needle->bits.httpproxy || needle->protocol&PROT_SSL) {
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Date: 2007-10-22 11:54
Message:
Logged In: YES 
user_id=1110
Originator: NO
isn't PROT_SSL set in needle->protocol if you use HTTPS?
----------------------------------------------------------------------
Comment By: Mikhail (gibigaba)
Date: 2007-10-12 17:39
Message:
Logged In: YES 
user_id=1671616
Originator: YES
Previous was wrong direction... This might be right.
--- ..\..\curl-7.17.0\lib\url.c 2007-09-03 03:53:15.000000000 +0600
+++ url.c       2007-10-12 21:39:38.765625000 +0600
@@ -2216,7 +2216,11 @@
       /* don't do mixed SSL and non-SSL connections */
       continue;
-    if(!needle->bits.httpproxy || needle->protocol&PROT_SSL) {
+    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. */
----------------------------------------------------------------------
Comment By: Mikhail (gibigaba)
Date: 2007-10-12 17:36
Message:
Logged In: YES 
user_id=1671616
Originator: YES
sure
--- ..\..\curl-7.17.0\lib\url.c 2007-10-12 17:34:23.312500000 +0600
+++ url.c       2007-09-03 03:53:15.000000000 +0600
@@ -2216,11 +2216,7 @@
       /* don't do mixed SSL and non-SSL connections */
       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))) {
+    if(!needle->bits.httpproxy || needle->protocol&PROT_SSL) {
       /* The requested connection does not use a HTTP proxy or it
          uses SSL. */
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Date: 2007-10-12 13:51
Message:
Logged In: YES 
user_id=1110
Originator: NO
Can you please provide the patch done with diff -u ?
----------------------------------------------------------------------
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1812190&group_id=976
Received on 2007-10-22

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET