Closed
Description
by mislav.marohnic:
Go respects HTTP_PROXY environment variables, **except** when the original request is to "localhost" or "127.0.0.1". This special case is surprising (it's not documented) and undesired. I've come across this when I tried to debug a go program that makes HTTP requests by passing all communication through a HTTP debugging proxy: http_proxy=localhost:8888 myprog ... However since this program makes HTTP requests to a *local test server*, my proxy configuration was silently ignored. The only way around this was to literally reimplement `http.ProxyFromEnvironment` in my program without the needless special case for localhost. go version 1.2