Browse Source
reverse_proxy: Ignore context.Canceled errors
These happen when downstream clients cancel the request, but that's not
our problem nor a failure in our end
master
Matthew Holt
6 years ago
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
1 changed files with
3 additions and
1 deletions
-
modules/caddyhttp/reverseproxy/reverseproxy.go
|
@ -224,7 +224,9 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht |
|
|
|
|
|
|
|
|
// proxy the request to that upstream
|
|
|
// proxy the request to that upstream
|
|
|
proxyErr = h.reverseProxy(w, r, upstream) |
|
|
proxyErr = h.reverseProxy(w, r, upstream) |
|
|
if proxyErr == nil { |
|
|
if proxyErr == nil || proxyErr == context.Canceled { |
|
|
|
|
|
// context.Canceled happens when the downstream client
|
|
|
|
|
|
// cancels the request; we don't have to worry about that
|
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|