commit | 26ecb42fb4c5ee1d8b64f12e5bb8df6549523d23 | [log] [tgz] |
---|---|---|
author | Emmanuel Odeke <emm.odeke@gmail.com> | Sat Apr 16 02:04:00 2016 -0700 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Sat Apr 16 15:31:33 2016 +0000 |
tree | c68d90902ad39ad019b60c98b6ac9841097b9543 | |
parent | 585590549a3c6e26e7963081e11478a1913744a6 [diff] |
net/http: normalize empty port in URL.Host's ":port" - Ensures that the empty port and preceeding ":" in a URL.Host are stripped. Normalize the empty port in a URL.Host's ":port" as mandated by RFC 3986 Section 6.2.3 which states that: `Likewise an explicit ":port", for which the port is empty or the default for the scheme, is equivalent to one where the port and its ":" delimiter are elided and thus should be removed by scheme-based normalization.` - Moves function `hasPort` from client.go (where it was defined but not used directly), to http.go the common area. Fixes #14836 Change-Id: I2067410377be9c71106b1717abddc2f8b1da1c03 Reviewed-on: https://go-review.googlesource.com/22140 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@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.
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.