net: SplitHostPort() doesn't respect RFC5952 section 6 #37817
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
go version go1.13.1 linux/amd64
repreduced with latest stable version of GO
https://play.golang.org/p/O2OIUNDXPZ_9
go env
OutputWhat did you do?
to repreduce the issue:
According to the following screenshot of the RFC5952 section 6,
net.SplitHostPort()
doesn't respect it.the function doesn't support
<ipv6>:<port>
parsing and support only[<ipv6>]:<port>
.https://play.golang.org/p/O2OIUNDXPZ_9
What did you expect to see?
2a04:c44:e00:147a:441:aaff:fe00:1d2:8080 parsed to ip=2a04:c44:e00:147a:441:aaff:fe00:1d2 port=8080
What did you see instead?
error output: too many colons in address
The text was updated successfully, but these errors were encountered: