X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/12495b9c8e1cbde47d0a96c021d96141c51f10d8..d12160e0b194eed8b059a54d92075fa1c6dfcd10:/lib/controller/proxy.go diff --git a/lib/controller/proxy.go b/lib/controller/proxy.go index c01c152352..9eac9362c9 100644 --- a/lib/controller/proxy.go +++ b/lib/controller/proxy.go @@ -25,19 +25,23 @@ func (h HTTPError) Error() string { return h.Message } -// headers that shouldn't be forwarded when proxying. See -// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers var dropHeaders = map[string]bool{ + // Headers that shouldn't be forwarded when proxying. See + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers "Connection": true, "Keep-Alive": true, "Proxy-Authenticate": true, "Proxy-Authorization": true, - "TE": true, - "Trailer": true, - "Transfer-Encoding": true, // *-Encoding headers interfer with Go's automatic compression/decompression - "Content-Encoding": true, + // (comment/space here makes gofmt1.10 agree with gofmt1.11) + "TE": true, + "Trailer": true, + "Upgrade": true, + + // Headers that would interfere with Go's automatic + // compression/decompression if we forwarded them. "Accept-Encoding": true, - "Upgrade": true, + "Content-Encoding": true, + "Transfer-Encoding": true, } type ResponseFilter func(*http.Response, error) (*http.Response, error)