golang/go

net/http: provide better error message when proxy is misconfigured

Open

#29,809 opened on Jan 18, 2019

View on GitHub
 (13 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsFixhelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

What version of Go are you using (go version)?

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

What did you do?

Doing a go get fails behind a corporate proxy if environment variables are set as below; HTTP_PROXY=http://proxyIp:proxyPort it succeeds if set as HTTP_PROXY=proxyIp:proxyPort this is true for HTTP or HTTPS variables This is also true for any go project using net/http I'm seeing this issue with Docker versions greater than 17.09, Jenkins-x, goBuffalo Older versions of go (specifically 1.8.3 - the only version I tested) do not behave this way Docker version 17.09 and lower do not behave this way.

What did you expect to see?

I expect it to pull through the proxy server with the below environment variables set; HTTP_PROXY=http://proxyIp:proxyPort HTTPS_PROXY=https://proxyIp:proxyPort

What did you see instead?

Process fails to get through the proxy.

Contributor guide