cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Side effect when no proxy is set

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 14 Dec 2006 18:48:16 +0100 (CET)

On Thu, 14 Dec 2006, Guillaume Fraysse wrote:

> I'm using the easy interface and use the same handler between connections
> and when no proxy is set in my application no call is made to
> curl_easy_setopt (CURLOPT_PROXY). After a random number of downloads it
> seems that libcurl somehow find that there is a proxy set and read it
> somewhere in the memory which leads to the error CURLE_COULDNT_RESOLVE_PROXY
> when curl_easy_perform is done. There is somekind of memory corruption
> occuring somewhere there it seems.

It certainly sounds so, yes. libcurl also checks for the proxy environment
variables, so if you "happen" to set them during execution...

> As a patch I forced my application to make set an empty string as the
> CURLOPT_PROXY and the problem is gone.

... that makes the environment variable theory more likely and the memory
corruption theory less likely I'd say.

> I'm using a debian package of version 7.3.12.

You mean 7.12.3 ?

An old version it is still.

> Has someone experienced something similar ? Or am I missing something in the
> way libcurl should be used ? Is this a known bug ? I haven't found a known
> similar problem.

I've never heard anyone have a similar problem before.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-12-14