curl-library
Re: Automatic use of http_proxy environment variable
Date: Tue, 16 Sep 2014 14:55:25 +0200 (CEST)
On Tue, 16 Sep 2014, andrei_at_korostelev.net wrote:
> We have an app which we distribute to Windows and Linux and which makes use
> of libcurl. The app allows to setup proxy in config file. However when
> http_proxy env. variable is set it comes into a conflict with app-specific
> proxy settings. This is especially annoying for Windows users.
Can't you then just set the proxy if there is one, and set it to "" if you
explicitly do not want one? I can't think of a situation where this would be
unclear. Can you?
> The solution I propose is very simple. Since all proxy-detection magic lives
> in detect_proxy() function in url.c, we can easily call this function
> conditionally:
>
> #ifdef CURL_ENABLE_PROXY_DETECTION
> proxy = detect_proxy(conn);
> #endif
If a disable switch really is necessary, I would think it should be possible
to set at run-time and not require a special build!
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-09-16