Commit 881b1b4a authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

http: be clear when failing to connect to a proxy

Ubuntu and/or GNOME have some bug that likes
to set the "http_proxy" environment variable
and forgets to unset it.  This is annoying
to debug.  Be clear in the error message that
a proxy was in use.

R=rsc
CC=golang-dev
https://golang.org/cl/4409045
parent a89c0ff3
......@@ -217,6 +217,9 @@ func (t *Transport) getConn(cm *connectMethod) (*persistConn, os.Error) {
conn, err := net.Dial("tcp", cm.addr())
if err != nil {
if cm.proxyURL != nil {
err = fmt.Errorf("http: error connecting to proxy %s: %v", cm.proxyURL, err)
}
return nil, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment