federation: Avoid printing context canceled error (#7997)

Golang proactively prints this error
        `http: proxy error: context canceled`

when a request arrived to the current deployment and
redirected to another deployment in a federated setup.

Since this error can confuse users, this commit will
just hide it.
This commit is contained in:
Anis Elleuch
2019-07-31 19:08:10 +01:00
committed by kannappanr
parent c71895f225
commit cbd02c58be
2 changed files with 15 additions and 1 deletions

View File

@@ -746,6 +746,9 @@ func setBucketForwardingHandler(h http.Handler) http.Handler {
fwd := handlers.NewForwarder(&handlers.Forwarder{
PassHost: true,
RoundTripper: NewCustomHTTPTransport(),
Logger: func(err error) {
logger.LogIf(context.Background(), err)
},
})
return bucketForwardingHandler{fwd, h}
}