golang/go

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

Open

#29.809 aperta il 18 gen 2019

Vedi su GitHub
 (13 commenti) (0 reazioni) (0 assegnatari)Go (19.008 fork)batch import
NeedsFixhelp wanted

Metriche repository

Star
 (133.883 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor