]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: fix test to check that requests to 'localhost' are not proxied
authorRajat Goel <rajat.goel2010@gmail.com>
Tue, 10 Feb 2015 01:12:12 +0000 (17:12 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 10 Feb 2015 03:01:30 +0000 (03:01 +0000)
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>
src/net/http/proxy_test.go

index b6aed3792b63304555e7bc967d3fa00c86e331b5..823d1447ee91a9190a222c44a7420378dc6355cb 100644 (file)
@@ -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},