]> Cypherpunks repositories - gostls13.git/commit
net/url: document requirements for IPv6 addresses in URL.Host
authorDamien Neil <dneil@google.com>
Tue, 11 Jul 2023 22:34:09 +0000 (15:34 -0700)
committerDamien Neil <dneil@google.com>
Thu, 20 Jul 2023 16:58:55 +0000 (16:58 +0000)
commit89699847bf29c9891c95c8c55f8b6bff82c8f4e2
tree6da04943253738966ef9ec12aa930abdf05a5a53
parent89265f98948718c0d4d3d4763decf02914188ae6
net/url: document requirements for IPv6 addresses in URL.Host

When the host subcomponent of a URL is an IPv6 address, it must be
surrounded by square brackets to prevent colons in the address
from being interpreted as the port: "[fe80::1]:80".

Document this requirement.

Fixes #61093
Fixes #61276

Change-Id: Iaf411b9dc211fd876468d6e2e94ff672ba0d329d
Reviewed-on: https://go-review.googlesource.com/c/go/+/508976
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/net/url/url.go