cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using CURLOPT_PROXY to turn off proxy use?

From: Adam D. Moss <adam_at_gimp.org>
Date: Thu, 22 Feb 2007 21:26:34 +0000

Daniel Stenberg wrote:
> I think it sounds like a regression... and that it is an additional bug
> that the docs doesn't mention this way. And I figure we should add a
> test case that verifies that this works...
>
> However, using the current CVS with a test snippet like below it seems
> to work fine for me:
>
> int main(void)
> {
> CURL *curl;
> CURLcode res;
>
> setenv("http_proxy", "bad-host-name-non-existing.moo", 1);
>
> curl = curl_easy_init();
> if(curl) {
> curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
> curl_easy_setopt(curl, CURLOPT_PROXY, "");
> curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
> res = curl_easy_perform(curl);
>
> /* always cleanup */
> curl_easy_cleanup(curl);
> }
> return 0;
> }

Thanks for the response - I'll recheck the diagnosis tomorrow
and perhaps compare with CVS!

Cheers,
--Adam
Received on 2007-02-22