cURL / Mailing Lists / curl-library / Single Mail

curl-library

[ curl-Patches-621009 ] empty proxy string breaks conn-reuse

From: <noreply_at_sourceforge.net>
Date: Wed, 09 Oct 2002 14:03:28 -0700

Patches item #621009, was opened at 2002-10-09 16:03
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=300976&aid=621009&group_id=976

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Lawson (bovineone)
Assigned to: Nobody/Anonymous (nobody)
Summary: empty proxy string breaks conn-reuse

Initial Comment:
In curl 7.10 there is a new feature to allow setting the
proxy to an empty value to prevent
automatic "http_proxy"/"all_proxy"/etc environment
variable use.

curl_easy_setopt(curl, CURLOPT_PROXY, "");

Although this functionality works, there are several other
places where this new functionality is not properly
handled.

Specifically, an empty proxy string will cause
connection reuse to break and always open new HTTP
connections for multiple requests to the same server,
when the http proxy port is also different from the
destination http server port. This is because
url.c:ConnectionExists() alters its behavior when the
variable "needle->bits.httpproxy" is set, and that is
always set true if the proxy is not NULL. That "needle-
>bits.httpproxy" variable should only be set if the proxy
is not NULL and also not empty.

The attached patch corrects this, and a couple of other
places where a similar mistake appears to have been
made.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=300976&aid=621009&group_id=976

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-09