]> Cypherpunks repositories - gostls13.git/commit
net/http: fix bug parsing http_proxy lacking a protocol
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 6 Dec 2012 03:08:42 +0000 (19:08 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 6 Dec 2012 03:08:42 +0000 (19:08 -0800)
commita034fc9855b307ab5e9e5da04602823d6414f512
tree6c4ab24972bb6155151d49e9e3d2116631b54067
parent08918ba43851d28e860fdaeb79aed0738639a394
net/http: fix bug parsing http_proxy lacking a protocol

Per the curl man page, the http_proxy configuration can be
of the form:

   [protocol://]<host>[:port]

And we had a test that <ip>:<port> worked, but if
the host began with a letter, url.Parse parsed the hostname
as the scheme instead, confusing ProxyFromEnvironment.

R=golang-dev
CC=golang-dev
https://golang.org/cl/6875060
src/pkg/net/http/transport.go
src/pkg/net/http/transport_test.go