cURL / Mailing Lists / curl-library / Single Mail


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

From: <>
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:

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

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


You can respond by visiting:

This email is sponsored by:ThinkGeek
Welcome to geek heaven.
Received on 2002-10-09