]> Cypherpunks repositories - gostls13.git/commit
net: SplitHostPort: adjust error message for missing port in IPv6 addresses
authorMichael Teichgräber <mteichgraeber@gmx.de>
Wed, 30 Jan 2013 17:25:16 +0000 (09:25 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 30 Jan 2013 17:25:16 +0000 (09:25 -0800)
commitad341843a7661e4883c8a66b12433e55db1dfc7e
tree925bfc0bd9adfee9c85cc02830872b7ae9e55ece
parenteaced459ca567a364bcb18598efcd8cf7118a894
net: SplitHostPort: adjust error message for missing port in IPv6 addresses

An hostport of "[::1]" now results in the same error message
"missing port in address" as the hostport value "127.0.0.1",
so SplitHostPort won't complain about "too many colons
in address" anymore for an IPv6 address missing a port.

Added tests checking the error values.

Fixes #4526.

R=dave, rsc, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/7038045
src/pkg/net/ip_test.go
src/pkg/net/ipsock.go