[Haskell-cafe] http-client: proxy environment variable support

Miguel Mitrofanov miguelimo38 at yandex.ru
Mon Jan 19 14:33:17 UTC 2015


I think it might be good to also allow user to explicitly require not to use proxy, even if it's set in environment.

19.01.2015, 16:53, "Michael Snoyman" <michael at snoyman.com>:
> Neil Mitchell opened an issue[1] for http_proxy and https_proxy environment variable support in http-client. I've written that support, and it's ready to go, but there's an open question: what should the default behavior be? In particular, should environment variables, by default, be checked to determine the proxy, or not? Arguments each way:
>
> In favor of using environment variables:
> * Matches behavior of many other tools and libraries
> * Allows application users control without requiring a code change from application writers
>
> Against using environment variables:
> * It's a change in behavior vs what http-client does today (though that could certainly be seen as just a missing feature)
> * Environment variables will implicitly change the behavior of code, which generally speaking can be problematic
>
> I'm leaning towards having the default behavior be:
>
> * If the user explicitly chooses a proxy setting on the manager, use that
> * If the user explicitly sets a proxy value on the Request, use that
> * If the environment variable is set, use that
> * Otherwise, no proxy
>
> In addition to whether we should make this change in behavior, I'm also interested in whether people think this should require a major version bump.
>
> [1] https://github.com/snoyberg/http-client/issues/94
> ,
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list