haskell / HTTP

Haskell HTTP package

Home Page:http://hackage.haskell.org/package/HTTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider treating empty http_proxy value as if it is not present

hsenag opened this issue · comments

A cabal-install user ran into this: http://www.haskell.org/pipermail/ghc-devs/2014-May/004928.html

In general I think HTTP ought to follow any standard or agreed practice for the use of this variable. I see the plausible options as:

  1. Do nothing and continue confusing users
  2. Fail but with a more helpful error message
  3. Treat empty as non-existent

I can't find any official specification of what http_proxy should mean and some googling suggests that many other people seem to favour 3) as well - see e.g. pypa/pip#478 - so I am inclined towards doing that.

The fairly simple code change would go here: https://github.com/haskell/HTTP/blob/master/Network/HTTP/Proxy.hs#L64

I suggest solution 3) Treat empty as non-existent.

cURL, Wget, apt-get, npm, pkgin all treat an empty but present http_proxy variable as non-existent.

It seems to be common practice.