1
0
mirror of https://github.com/golang/go synced 2024-10-04 15:11:20 -06:00
go/src/net/url
Russ Cox fced03a5c6 net/url: allow all valid host chars in RawPath
The old code was only allowing the chars we choose not to escape.
We sometimes prefer to escape chars that do not strictly need it.
Allowing those to be used in RawPath lets people override that
preference, which is in fact the whole point of RawPath (new in Go 1.5).

While we are here, also allow [ ] in RawPath.
This is not strictly spec-compliant, but it is what modern browers
do and what at least some people expect, and the [ ] do not cause
any ambiguity (the usual reason they would be escaped, as they are
part of the RFC gen-delims class).
The argument for allowing them now instead of waiting until Go 1.6
is that this way RawPath has one fixed meaning at the time it is
introduced, that we should not need to change or expand.

Fixes #5684.

Change-Id: If9c82a18f522d7ee1d10310a22821ada9286ee5c
Reviewed-on: https://go-review.googlesource.com/13258
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-06 02:59:16 +00:00
..
example_test.go net/url: add example to URL.ResolveReference 2015-07-16 16:18:18 +00:00
url_test.go net/url: allow all valid host chars in RawPath 2015-08-06 02:59:16 +00:00
url.go net/url: allow all valid host chars in RawPath 2015-08-06 02:59:16 +00:00