mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-16 21:56:40 -05:00
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
This commit is contained in:
parent
acb8f0e0c2
commit
a60d54dbfd
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue