X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a7a482db3954fa6470be74f0e00f6e1e105e0b6c..bad877eb1d1a84d25c1fab3592e4218774816179:/lib/controller/proxy.go diff --git a/lib/controller/proxy.go b/lib/controller/proxy.go index 939868a17b..13dfcac16a 100644 --- a/lib/controller/proxy.go +++ b/lib/controller/proxy.go @@ -42,6 +42,9 @@ var dropHeaders = map[string]bool{ "Accept-Encoding": true, "Content-Encoding": true, "Transfer-Encoding": true, + + // Content-Length depends on encoding. + "Content-Length": true, } type ResponseFilter func(*http.Response, error) (*http.Response, error) @@ -77,9 +80,7 @@ func (p *proxy) Do( Header: hdrOut, Body: reqIn.Body, }).WithContext(reqIn.Context()) - - resp, err := client.Do(reqOut) - return resp, err + return client.Do(reqOut) } // Copy a response (or error) to the downstream client