summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-03 19:10:09 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-03 19:10:09 -0600
commita60d54dbfd93f74187b4051f1522c42d34480503 (patch)
tree8321760247b4fbcefd4463a4f3bfca585f2f2cba /modules
parentacb8f0e0c26acd95cbee8981469b4ac62535d164 (diff)
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
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/reverseproxy/reverseproxy.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go
index 16d7f7a..7bf9a2f 100644
--- a/modules/caddyhttp/reverseproxy/reverseproxy.go
+++ b/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
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
}