Commit d34ee29a authored by Rajat Goel's avatar Rajat Goel Committed by Brad Fitzpatrick

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/4293Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a1dbb920
...@@ -18,7 +18,7 @@ var UseProxyTests = []struct { ...@@ -18,7 +18,7 @@ var UseProxyTests = []struct {
match bool match bool
}{ }{
// Never proxy localhost: // Never proxy localhost:
{"localhost:80", false}, {"localhost", false},
{"127.0.0.1", false}, {"127.0.0.1", false},
{"127.0.0.2", false}, {"127.0.0.2", false},
{"[::1]", false}, {"[::1]", false},
......
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