Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(80)

Issue 7038045: code review 7038045: net: SplitHostPort: adjust error message for missing po...

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by knieriem
Modified:
12 years, 11 months ago
Reviewers:
rsc, mikio
CC:
dave_cheney.net, rsc, mikio, golang-dev
Visibility:
Public.

Description

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 issue 4526.

Patch Set 1 #

Patch Set 2 : diff -r 88ae367d61aa https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 88ae367d61aa https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 4 : diff -r 08a1396e9aa7 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 7359dad2971d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -11 lines) Patch
M src/pkg/net/ip_test.go View 1 2 3 4 2 chunks +32 lines, -0 lines 0 comments Download
M src/pkg/net/ipsock.go View 1 2 3 4 1 chunk +50 lines, -11 lines 0 comments Download

Messages

Total messages: 13
knieriem
Hello golang-dev@googlegroups.com (cc: mikioh.mikioh@gmail.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years ago (2012-12-31 20:41:07 UTC) #1
dave_cheney.net
What happens with these test cases 0.0.0.0:0 :0 127.0.0.1: www.google.com: On 1 Jan 2013 10:27, ...
13 years ago (2012-12-31 23:34:48 UTC) #2
knieriem
On Tue, 1 Jan 2013 10:34:47 +1100 Dave Cheney <dave@cheney.net> wrote: > What happens with ...
13 years ago (2013-01-02 02:06:07 UTC) #3
rsc
https://codereview.appspot.com/7038045/diff/2002/src/pkg/net/ip_test.go File src/pkg/net/ip_test.go (right): https://codereview.appspot.com/7038045/diff/2002/src/pkg/net/ip_test.go#newcode271 src/pkg/net/ip_test.go:271: {"google.com", "https%foo", "google.com:https%foo"}, // Go 1.0 behavior Please add ...
13 years ago (2013-01-07 04:55:41 UTC) #4
knieriem
I've prepared a program in the Go Playground that contains all the changes: http://play.golang.org/p/9Im0PcQf-F It ...
13 years ago (2013-01-08 13:58:40 UTC) #5
knieriem
Hello dave@cheney.net, rsc@golang.org (cc: golang-dev@googlegroups.com, mikioh.mikioh@gmail.com), Please take another look.
13 years ago (2013-01-08 15:59:05 UTC) #6
rsc
Let's reject [] anywhere other than in the [host]:port form.
13 years ago (2013-01-09 19:19:12 UTC) #7
knieriem
Hello dave@cheney.net, rsc@golang.org (cc: golang-dev@googlegroups.com, mikioh.mikioh@gmail.com), Please take another look.
13 years ago (2013-01-09 22:38:18 UTC) #8
knieriem
On Wed, 9 Jan 2013 14:19:10 -0500 Russ Cox <rsc@golang.org> wrote: > Let's reject [] ...
13 years ago (2013-01-09 22:40:15 UTC) #9
rsc
LGTM Perhaps mikio would like to look too.
12 years, 12 months ago (2013-01-18 20:15:35 UTC) #10
mikio
LGTM leave for rsc
12 years, 12 months ago (2013-01-19 00:33:58 UTC) #11
rsc
LGTM Hi Michael, It looks like you still need to complete a CLA as described ...
12 years, 11 months ago (2013-01-22 22:03:40 UTC) #12
rsc
12 years, 11 months ago (2013-01-30 17:25:21 UTC) #13
*** Submitted as https://code.google.com/p/go/source/detail?r=4b48471048eb ***

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 issue 4526.

R=dave, rsc, mikioh.mikioh
CC=golang-dev
https://codereview.appspot.com/7038045

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b