cURL Mailing List Monthly Index Single Mail
curl-tracker Archives
[curl:bugs] Re: #1461 curl_easy_reset removes proxy information via environment
From: JoSch <josch1337_at_users.sf.net>
Date: Sat, 06 Dec 2014 09:15:48 +0000
Hi,
Quoting Daniel Stenberg (2014-12-06 02:31:33)
my apologies. I should've compiled a minimal example with which to reproduce
Here a code snippet:
--%<---------------------------------------------------------------------------
int main(void)
curl = curl_easy_init();
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
Compile and run it:
$ gcc -lcurl http-post.c && http_proxy=127.0.0.1:8080 ./a.out
Assuming that the http proxy 127.0.0.1 does NOT exist, this should throw an
Now remove the comment from the CURLOPT_PROXY line above and run it again. This
So why for https requests do I have to explicitly set CURLOPT_PROXY?
This might now just as well be something in the documentation I missed.
Thanks!
cheers, josch
--- ** [bugs:#1461] curl_easy_reset removes proxy information via environment** **Status:** open **Created:** Fri Dec 05, 2014 11:58 AM UTC by JoSch **Last Updated:** Sat Dec 06, 2014 01:31 AM UTC **Owner:** Daniel Stenberg Hi, the documentation for curl_easy_reset says: "Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with curl_easy_init." Suppose I have set the http_proxy environment variable. Then that one will be properly respected after a curl_easy_init. But once I do curl_easy_reset that information is lost. So either above documentation has to be adapted to say "This puts back the handle to the same state as it was in when it was just created with curl_easy_init except that any proxy server set with the http_proxy environment variable is lost". Or curl_easy_reset should respect the value of the http_proxy environment variable if it is set. --- Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to http://sourceforge.net/p/curl/bugs/ To unsubscribe from further messages, a project admin can change settings at http://sourceforge.net/p/curl/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.Received on 2014-12-06 These mail archives are generated by hypermail. |