• Emmanuel Odeke's avatar
    net/http: normalize empty port in URL.Host's ":port" · 26ecb42f
    Emmanuel Odeke authored
    - 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/22140Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    26ecb42f
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...