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

Issue 7135051: code review 7135051: net/url: generate correct Path when hostname empty (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by adg
Modified:
11 years, 3 months ago
Reviewers:
CC:
bradfitz, rsc, golang-dev
Visibility:
Public.

Description

net/url: generate correct Path when hostname empty Parse("file:///foo") previously returned a URL with Scheme "file" and Path "///foo". Now it returns a URL with Path "/foo", such that &URL{Scheme: "file", Path: "/foo"}.String() == "file:///foo" This means that parsing and stringifying the URL "file:/foo" returns "file:///foo", technically a regression but one that only affects a corner case. Fixes issue 4189.

Patch Set 1 #

Total comments: 2

Patch Set 2 : diff -r 7dc8d66efb6d https://code.google.com/p/go #

Patch Set 3 : diff -r 7dc8d66efb6d https://code.google.com/p/go #

Total comments: 3

Patch Set 4 : diff -r 4fa0edc28df9 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -5 lines) Patch
M src/pkg/net/url/url.go View 2 chunks +5 lines, -3 lines 0 comments Download
M src/pkg/net/url/url_test.go View 1 2 3 2 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 13
adg
Hello bradfitz (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 4 months ago (2013-01-17 04:57:18 UTC) #1
rsc
might want to ping CL 6931047 to let him know you've started this instead. (that ...
11 years, 4 months ago (2013-01-17 14:06:24 UTC) #2
bradfitz
https://codereview.appspot.com/7135051/diff/1/src/pkg/net/url/url_test.go File src/pkg/net/url/url_test.go (left): https://codereview.appspot.com/7135051/diff/1/src/pkg/net/url/url_test.go#oldcode125 src/pkg/net/url/url_test.go:125: // non-authority I'd prefer to keep this test. At ...
11 years, 4 months ago (2013-01-17 20:04:00 UTC) #3
adg
https://codereview.appspot.com/7135051/diff/1/src/pkg/net/url/url_test.go File src/pkg/net/url/url_test.go (left): https://codereview.appspot.com/7135051/diff/1/src/pkg/net/url/url_test.go#oldcode125 src/pkg/net/url/url_test.go:125: // non-authority On 2013/01/17 20:04:00, bradfitz wrote: > I'd ...
11 years, 4 months ago (2013-01-17 23:28:53 UTC) #4
bradfitz
On Thu, Jan 17, 2013 at 3:28 PM, <adg@golang.org> wrote: > > https://codereview.appspot.**com/7135051/diff/1/src/pkg/** > net/url/url_test.go<https://codereview.appspot.com/7135051/diff/1/src/pkg/net/url/url_test.go> ...
11 years, 4 months ago (2013-01-18 18:58:45 UTC) #5
rsc
is there a semantic difference between file:///foo and file:/foo?
11 years, 4 months ago (2013-01-18 19:11:04 UTC) #6
adg
On 19 January 2013 06:11, Russ Cox <rsc@golang.org> wrote: > is there a semantic difference ...
11 years, 4 months ago (2013-01-18 22:54:08 UTC) #7
rsc
As long as mailto:foo stays mailto:foo I don't care if mailto:/foo turns into mailto:///foo. Russ
11 years, 4 months ago (2013-01-18 22:56:47 UTC) #8
bradfitz
SGTM On Jan 18, 2013 2:56 PM, "Russ Cox" <rsc@golang.org> wrote: > As long as ...
11 years, 4 months ago (2013-01-19 01:20:26 UTC) #9
adg
Hello bradfitz@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2013-01-21 05:06:57 UTC) #10
bradfitz
LGTM https://codereview.appspot.com/7135051/diff/12002/src/pkg/net/url/url.go File src/pkg/net/url/url.go (right): https://codereview.appspot.com/7135051/diff/12002/src/pkg/net/url/url.go#newcode437 src/pkg/net/url/url.go:437: // TODO: Rewrite to use bytes.Buffer I think ...
11 years, 3 months ago (2013-01-22 21:37:57 UTC) #11
adg
*** Submitted as https://code.google.com/p/go/source/detail?r=c7719e0e0a2c *** net/url: generate correct Path when hostname empty Parse("file:///foo") previously returned ...
11 years, 3 months ago (2013-01-23 00:37:13 UTC) #12
adg
11 years, 3 months ago (2013-01-23 00:37:37 UTC) #13
On 23 January 2013 08:37, <bradfitz@golang.org> wrote:

> I think it's time to do this.  In a following CL soon.


Will do.
Sign in to reply to this message.

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