Skip to content

Commit dca4914

Browse files
cpugopherbot
authored andcommitted
acme: fix autocert TestHTTPHandlerDefaultFallback
The Go 1.25.2 release made net/url stricter about parsing bracketed IPv6 hostnames, and is rejecting some test URLs used in the autocert TestHTTPHandlerDefaultFallback test with an error about the colon-separated fields requiring at least one hex digit. This commit replaces the invalid `xxxx` portion of some test URLS with valid hex digits, fixing the test regression. Change-Id: I84c192b1cd6daf53ef4199f7987437fd825f7041 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/710155 Reviewed-by: Roland Shoemaker <[email protected]> Auto-Submit: Daniel McCarney <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 1336e21 commit dca4914

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

acme/autocert/autocert_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ func TestHTTPHandlerDefaultFallback(t *testing.T) {
561561
{"GET", "http://example.org/foo?a=b", 302, "https://example.org/foo?a=b"},
562562
{"GET", "http://example.org:80/foo?a=b", 302, "https://example.org:443/foo?a=b"},
563563
{"GET", "http://example.org:80/foo%20bar", 302, "https://example.org:443/foo%20bar"},
564-
{"GET", "http://[2602:d1:xxxx::c60a]:1234", 302, "https://[2602:d1:xxxx::c60a]:443/"},
565-
{"GET", "http://[2602:d1:xxxx::c60a]", 302, "https://[2602:d1:xxxx::c60a]/"},
566-
{"GET", "http://[2602:d1:xxxx::c60a]/foo?a=b", 302, "https://[2602:d1:xxxx::c60a]/foo?a=b"},
564+
{"GET", "http://[2602:d1:abcd::c60a]:1234", 302, "https://[2602:d1:abcd::c60a]:443/"},
565+
{"GET", "http://[2602:d1:abcd::c60a]", 302, "https://[2602:d1:abcd::c60a]/"},
566+
{"GET", "http://[2602:d1:abcd::c60a]/foo?a=b", 302, "https://[2602:d1:abcd::c60a]/foo?a=b"},
567567
{"HEAD", "http://example.org", 302, "https://example.org/"},
568568
{"HEAD", "http://example.org/foo", 302, "https://example.org/foo"},
569569
{"HEAD", "http://example.org/foo/bar/", 302, "https://example.org/foo/bar/"},

0 commit comments

Comments
 (0)