diff options
| author | Rajat Goel <rajat.goel2010@gmail.com> | 2015-02-09 17:12:12 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-02-10 03:01:30 +0000 |
| commit | d34ee29a52ac4c99cb2b88873b239cd2c8407c3b (patch) | |
| tree | b5438cf6cb8a02e8c8627b3a61bfbcc0c4678441 /src/net/http | |
| parent | a1dbb9201d6cbffce4d7b1396561b0fb99e441f2 (diff) | |
| download | go-d34ee29a52ac4c99cb2b88873b239cd2c8407c3b.tar.xz | |
net/http: fix test to check that requests to 'localhost' are not proxied
I think the test was meant to test requests to 'localhost:80' instead
of 'localhost:80:80'. It passes even with 'localhost:80:80' because
net.SplitHostPort fails inside useProxy. Please comment if you want to
leave old 'localhost:80' is the list too to check old code path.
Change-Id: Ic4cd21901563449e3d4e2f4c8caf723f4ca15bac
u
Reviewed-on: https://go-review.googlesource.com/4293
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/proxy_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/http/proxy_test.go b/src/net/http/proxy_test.go index b6aed3792b..823d1447ee 100644 --- a/src/net/http/proxy_test.go +++ b/src/net/http/proxy_test.go @@ -18,7 +18,7 @@ var UseProxyTests = []struct { match bool }{ // Never proxy localhost: - {"localhost:80", false}, + {"localhost", false}, {"127.0.0.1", false}, {"127.0.0.2", false}, {"[::1]", false}, |
