diff options
author | David Url <david@urld.io> | 2018-02-13 22:03:05 +0100 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-02-20 01:41:06 +0000 |
commit | 7662e6588c9433f1219e0a0c46bc563ba3f93f98 (patch) | |
tree | 699a37599fecf360ec616f46ca74a9ce49825e2f /src/net/http/httputil/reverseproxy.go | |
parent | 4313d7767d830e863e8f8b53a2b48ca8d0bf0a79 (diff) | |
download | go-7662e6588c9433f1219e0a0c46bc563ba3f93f98.tar.gz go-7662e6588c9433f1219e0a0c46bc563ba3f93f98.zip |
net/http: use RFC 723x as normative reference in docs
Replace references to the obsoleted RFC 2616 with references to RFC
7230 through 7235, to avoid unnecessary confusion.
Obvious inconsistencies are marked with todo comments.
Updates #21974
Change-Id: I8fb4fcdd1333fc5193b93a2f09598f18c45e7a00
Reviewed-on: https://go-review.googlesource.com/94095
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/http/httputil/reverseproxy.go')
-rw-r--r-- | src/net/http/httputil/reverseproxy.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/http/httputil/reverseproxy.go b/src/net/http/httputil/reverseproxy.go index b96bb21019..8704ab7a90 100644 --- a/src/net/http/httputil/reverseproxy.go +++ b/src/net/http/httputil/reverseproxy.go @@ -125,7 +125,10 @@ func cloneHeader(h http.Header) http.Header { } // Hop-by-hop headers. These are removed when sent to the backend. -// http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html +// As of RFC 7230, hop-by-hop headers are required to appear in the +// Connection header field. These are the headers defined by the +// obsoleted RFC 2616 (section 13.5.1) and are used for backward +// compatibility. var hopHeaders = []string{ "Connection", "Proxy-Connection", // non-standard but still sent by libcurl and rejected by e.g. google @@ -251,7 +254,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) { } // removeConnectionHeaders removes hop-by-hop headers listed in the "Connection" header of h. -// See RFC 2616, section 14.10. +// See RFC 7230, section 6.1 func removeConnectionHeaders(h http.Header) { if c := h.Get("Connection"); c != "" { for _, f := range strings.Split(c, ",") { |