cURL / Mailing Lists / curl-library / Single Mail


Re: NO_PROXY as an option for curl_easy_setopt

From: A. Craig West <>
Date: Wed, 7 Jan 2009 23:21:03 -0500

2009/1/7 Dan Fandrich <>:
> One thing about this patch is that the CURLOPT_NOPROXY option is ignored
> if the proxy is set through an environment variable. It's probably a bit
> odd that an app would set CURLOPT_NOPROXY without CURLOPT_PROXY, but if it
> happens libcurl ought to honour it.

I was just using the current logic, which mostly treats environment
settings as a separate universe from options. It is certainly possible
to change it, but I would consider any case that actually needed it
changed to be pretty broken by design...

> It occurred to me while looking over this patch that the proxy matching in
> the existing (and patched) libcurl isn't quite right. A NO_PROXY of
> "" will match a host "" which isn't what one would
> normally expect. That's probably something that should be addressed in the
> future, unless you want to tackle it now, of course!

The current behaviour is consistent with other software, but I agree
that it is not particularly useful. I can't think of any cases where
you would want to match, and I don't see any
way at all to specify it to match both and,
without matching as well. I'll do a patch for this
Received on 2009-01-08