617c93ce74
Host names in URLs must not use %-escaping for ASCII bytes, per RFC 3986. url.Parse has historically allowed spaces and < > " in the URL host. In Go 1.5, URL's String method started escaping those, but then Parse would rejects the escaped form. This CL is an attempt at some consistency between Parse and String as far as the accepted host characters and the encoding of host characters, so that if Parse succeeds, then Parse -> String -> Parse also succeeds. Allowing space seems like a mistake, so reject that in Parse. (Similarly, reject \t, \x01, and so on, all of which were being allowed.) Allowing < > " doesn't seem awful, so continue to do that, and go back to the Go 1.4 behavior of not escaping them in String. Fixes #11302. Change-Id: I0bf65b874cd936598f20694574364352a5abbe5f Reviewed-on: https://go-review.googlesource.com/17387 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
---|---|---|
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
favicon.ico | ||
LICENSE | ||
PATENTS | ||
README.md | ||
robots.txt |
The Go Programming Language
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.
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
Note that we do not accept pull requests and that we use the issue tracker for bug reports and proposals only. Please ask questions on https://forum.golangbridge.org or https://groups.google.com/forum/#!forum/golang-nuts.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
--
Binary Distribution Notes
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.