cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NO_PROXY as an option for curl_easy_setopt

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 6 Jan 2009 21:45:15 -0800

On Tue, Jan 06, 2009 at 01:50:02AM -0500, A. Craig West wrote:
> 2008/12/25 Daniel Stenberg <daniel_at_haxx.se>:
> > I can only agree that this functionality would be neat to offer using a
> > setopt() option as relying on the env variable only for this could be rather
> > annoying for an application.
> >
> > I'll welcome a patch!
>
> Ask and ye shall receive....

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.

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!

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2009-01-07