diff options
author | Than McIntosh <thanm@google.com> | 2023-07-07 16:49:15 -0400 |
---|---|---|
committer | Than McIntosh <thanm@google.com> | 2023-07-07 16:49:15 -0400 |
commit | 71aaa8bde1ba983894121987aaf09cb2012ab622 (patch) | |
tree | 12c26e401a50654e0d557b98b2136b18b5ee9d97 /src/net/http/http_test.go | |
parent | 3aba453b66371647dfad4e901fca578d2b564e09 (diff) | |
parent | 894d24d617bb72d6e1bed7b143f9f7a0ac16b844 (diff) | |
download | go-dev.inline.tar.gz go-dev.inline.zip |
[dev.inline] merge with master at 894d24d617dev.inline
Change-Id: I845eec08108c69228ebcba921f8a807a376d3fae
Diffstat (limited to 'src/net/http/http_test.go')
-rw-r--r-- | src/net/http/http_test.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/net/http/http_test.go b/src/net/http/http_test.go index 1c9fb33b69..91bb1b2620 100644 --- a/src/net/http/http_test.go +++ b/src/net/http/http_test.go @@ -48,35 +48,6 @@ func TestForeachHeaderElement(t *testing.T) { } } -func TestCleanHost(t *testing.T) { - tests := []struct { - in, want string - }{ - {"www.google.com", "www.google.com"}, - {"www.google.com foo", "www.google.com"}, - {"www.google.com/foo", "www.google.com"}, - {" first character is a space", ""}, - {"[1::6]:8080", "[1::6]:8080"}, - - // Punycode: - {"гофер.рф/foo", "xn--c1ae0ajs.xn--p1ai"}, - {"bücher.de", "xn--bcher-kva.de"}, - {"bücher.de:8080", "xn--bcher-kva.de:8080"}, - // Verify we convert to lowercase before punycode: - {"BÜCHER.de", "xn--bcher-kva.de"}, - {"BÜCHER.de:8080", "xn--bcher-kva.de:8080"}, - // Verify we normalize to NFC before punycode: - {"gophér.nfc", "xn--gophr-esa.nfc"}, // NFC input; no work needed - {"goph\u0065\u0301r.nfd", "xn--gophr-esa.nfd"}, // NFD input - } - for _, tt := range tests { - got := cleanHost(tt.in) - if tt.want != got { - t.Errorf("cleanHost(%q) = %q, want %q", tt.in, got, tt.want) - } - } -} - // Test that cmd/go doesn't link in the HTTP server. // // This catches accidental dependencies between the HTTP transport and |