Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/url: better path resolving #4706

Closed
moraes opened this issue Jan 25, 2013 · 4 comments
Closed

net/url: better path resolving #4706

moraes opened this issue Jan 25, 2013 · 4 comments
Milestone

Comments

@moraes
Copy link
Contributor

moraes commented Jan 25, 2013

The resolvePath function used by URL.ResolveReference doesn't cover all cases described
in the RFC 3986, and specially it fails to resolve some of the normal and abnormal
examples from sections 5.4.1 and 5.4.2 [1].

The code repository tip succeeds in some of these tests, but several still fail:
http://play.golang.org/p/F0ApSaXniv

[1] http://tools.ietf.org/html/rfc3986#section-5.4.1
@moraes
Copy link
Contributor Author

moraes commented Jan 25, 2013

Comment 1:

I created a codereview with a simplified resolvePath function and tests for the RFC
cases: https://golang.org/cl/7203059

@moraes
Copy link
Contributor Author

moraes commented Jan 25, 2013

Comment 2:

This same patch also fixes this: http://play.golang.org/p/089b-_xoNe

@rsc
Copy link
Contributor

rsc commented Jan 30, 2013

Comment 3:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Mar 11, 2013

Comment 4:

This issue was closed by revision 82e3ca7.

Status changed to Fixed.

dghubble added a commit to dghubble/sling that referenced this issue Apr 6, 2015
* Go 1.0 net/url ResolveReference behaved differently and did not
meet RFC 3986 with regard to '..' collapsing, empty strings, etc.
* golang/go#4706
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants