@marcel91200 / caddy Mirror · read-only / commits / 2bb2ecc5
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 09:30 UTC

reverseproxy: Change errors writing the response to warning. (#6532)

Most of the errors that can be seen here are write errors due to clients aborting the request from their side. Often seen ones include: * writing: ... write: broken pipe * writing: ... connection timed out * writing: http2: stream closed * writing: timeout... * writing: h3 error... Most of these errors are beyond of the control of caddy on the client side, probably nothing can be done on the server side. It still warrants researching when these errors occur very often, so a change in level from error to warn is better here to not polute the logs with errors in the normal case.

Jens-Uwe Mager committed Aug 21, 2024 at 19:39 UTC 2bb2ecc5498c99d535f5b8f56fb8a4732e818ad3
1 file changed +1 -1
modules/caddyhttp/reverseproxy/reverseproxy.go
+1 -1
@@ -979,7 +979,7 @@ func (h *Handler) finalizeResponse(
979 // we'll just log the error and abort the stream here and panic just as
980 // the standard lib's proxy to propagate the stream error.
981 // see issue https://github.com/caddyserver/caddy/issues/5951
982 - logger.Error("aborting with incomplete response", zap.Error(err))
982 + logger.Warn("aborting with incomplete response", zap.Error(err))
983 // no extra logging from stdlib
984 panic(http.ErrAbortHandler)
985 }