commit | fced03a5c6dd22dd486106e3dd116510c28c6e4a | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Wed Aug 05 22:12:16 2015 -0400 |
committer | Russ Cox <rsc@golang.org> | Thu Aug 06 02:59:16 2015 +0000 |
tree | a5bcc2f104eb3da8ccacd905b38dc1a8dc72ad0a | |
parent | e8be9a170c3044d7460a6b2c8349a723b1a21dd2 [diff] |
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>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.