cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NO_PROXY as an option for curl_easy_setopt

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

2009/1/7 Dan Fandrich <dan_at_coneharvesters.com>:
> 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
> "local.com" will match a host "www.notlocal.com" 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 local.com to match notlocal.com, and I don't see any
way at all to specify it to match both local.com and www.local.com,
without matching www.notlocal.com as well. I'll do a patch for this
tomorrow...
-Craig
Received on 2009-01-08