mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:14:53 +08: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
|
@ -224,7 +224,9 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht
|
|||
|
||||
// proxy the request to that 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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user