golang/go

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

Open

#29.809 geöffnet am 18. Jan. 2019

Auf GitHub ansehen
 (13 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (19.008 Forks)batch import
NeedsFixhelp wanted

Repository-Metriken

Stars
 (133.883 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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