1
0
mirror of https://github.com/golang/go synced 2024-10-04 21:21:22 -06:00
go/src
Emmanuel Odeke 26ecb42fb4 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>
2016-04-16 15:31:33 +00:00
..
archive archive/tar: style nit: s/nano_buf/nanoBuf/ 2016-04-15 21:29:18 +00:00
bufio all: replace magic 0x80 with named constant utf8.RuneSelf 2016-04-10 15:15:57 +00:00
builtin
bytes all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
cmd cmd/cgo: add missing formatting directive in error message 2016-04-15 22:03:22 +00:00
compress all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
container
context context: attempt to deflake timing tests 2016-04-11 23:15:02 +00:00
crypto all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
database/sql all: delete dead non-test code 2016-03-25 06:28:13 +00:00
debug all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
encoding all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
errors
expvar expvar: Ensure strings are written as valid JSON. 2016-04-06 03:52:39 +00:00
flag
fmt fmt: optimize struct layout and intbuf size 2016-04-15 19:28:41 +00:00
go net: context plumbing, add Dialer.DialContext 2016-04-15 22:48:12 +00:00
hash hash/adler32: Unroll loop for extra performance. 2016-04-15 10:17:17 +00:00
html html/template: add examples of loading templates from files 2016-04-13 02:28:28 +00:00
image image/color: order color computation to match rgb 2016-04-15 07:34:37 +00:00
index/suffixarray
internal internal/trace: fix int overflow in timestamps 2016-04-12 07:25:11 +00:00
io io: document WriteString calls Write exactly once 2016-04-12 01:03:51 +00:00
log
math all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
mime all: standardize RFC mention format 2016-04-12 21:07:52 +00:00
net net/http: normalize empty port in URL.Host's ":port" 2016-04-16 15:31:33 +00:00
os all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
path all: use bytes.Equal, bytes.Contains and strings.Contains, again 2016-04-11 15:16:54 +00:00
reflect all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
regexp all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
runtime runtime: don't always unblock all signals on dragonfly, freebsd and openbsd 2016-04-15 21:20:45 +00:00
sort all: delete dead non-test code 2016-03-25 06:28:13 +00:00
strconv all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
strings all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
sync all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
syscall syscall: fix epoll_event struct for ppc64le/ppc64 2016-04-13 20:58:46 +00:00
testing testing: removed flakey test 2016-04-14 14:00:43 +00:00
text text/template: emit field error over nil pointer error where appropriate 2016-04-10 23:29:29 +00:00
time all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
unicode all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
unsafe
vendor/golang.org/x/net/http2/hpack all: fix spelling mistakes 2016-04-03 17:03:15 +00:00
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash cmd/dist: redo flag-passing for bootstrap 2016-03-18 19:00:03 +00:00
make.bat
Make.dist
make.rc
naclmake.bash src: split nacltest.bash into naclmake.bash and keep nacltest.bash 2016-04-12 02:03:34 +00:00
nacltest.bash src: split nacltest.bash into naclmake.bash and keep nacltest.bash 2016-04-12 02:03:34 +00:00
race.bash
race.bat
run.bash
run.bat
run.rc