18887: it is OK for controller to forward the local anymous token,
[arvados.git] / lib / controller / proxy.go
index 939868a17b94f132644e3459292290294514e84f..13dfcac16abb0bb27c7b1f3d50d024436453f97c 100644 (file)
@@ -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