]> git.feebdaed.xyz Git - 0xmirror/grpc-go.git/commit
dns: drop test depending on invalid URL "dns://::1/foo.bar.com" (#8716)
authorDamien Neil <neild@users.noreply.github.com>
Fri, 21 Nov 2025 22:35:25 +0000 (14:35 -0800)
committerGitHub <noreply@github.com>
Fri, 21 Nov 2025 22:35:25 +0000 (14:35 -0800)
commitcdbafd304983c6c2a903c801d05e3ca531d49888
tree6b173803b1f9d830ddfee53233de18d1dfd112fb
parent76c67d16f885e590b388032a1113a1581d5d5ed6
dns: drop test depending on invalid URL "dns://::1/foo.bar.com" (#8716)

Go 1.26's url.Parse will reject invalid URLs containing unbracketed
colons in the hostname.

For example, Go 1.25 and earlier are willing to parse the URLs
"https://localhost:80:443" (hostname:"localhost:80", port:443)
and "https://::1" (hostname:":", port:1).

The test TestCustomAuthority contains a case which depends on
url.Parse("dns://::1/foo.bar.com") succeeding. In Go 1.26, this
case will fail.

Drop the test as not exercising a useful path: This URL is invalid
and earlier Go versions being willing to parse it was a bug.
The correct URL is "dns://[::1]/foo.bar.com" (which is also
exercised by TestCustomAuthority).

RELEASE NOTES:
* client: Reject target URLs containing unbracketed colons in the
hostname in Go version 1.26+.
internal/resolver/dns/dns_resolver_test.go