diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2022-02-23 17:12:07 +0100 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2022-02-23 17:12:07 +0100 |
commit | f0b0cfe9b2dcae6fa59ee5b18dc509cce2037efe (patch) | |
tree | ea59ef77e04c749f1480faeb6fe1514c990b99da /workerpool.go | |
parent | fix: (useless check), skip Response body if http method HEAD (#1224) (diff) | |
download | fasthttp-f0b0cfe9b2dcae6fa59ee5b18dc509cce2037efe.tar.gz fasthttp-f0b0cfe9b2dcae6fa59ee5b18dc509cce2037efe.tar.bz2 fasthttp-f0b0cfe9b2dcae6fa59ee5b18dc509cce2037efe.zip |
Don't log ErrBadTrailer by default
Diffstat (limited to 'workerpool.go')
-rw-r--r-- | workerpool.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/workerpool.go b/workerpool.go index 9b1987e..f1a9a4c 100644 --- a/workerpool.go +++ b/workerpool.go @@ -1,6 +1,7 @@ package fasthttp import ( + "errors" "net" "runtime" "strings" @@ -226,7 +227,8 @@ func (wp *workerPool) workerFunc(ch *workerChan) { strings.Contains(errStr, "reset by peer") || strings.Contains(errStr, "request headers: small read buffer") || strings.Contains(errStr, "unexpected EOF") || - strings.Contains(errStr, "i/o timeout")) { + strings.Contains(errStr, "i/o timeout") || + errors.Is(err, ErrBadTrailer)) { wp.Logger.Printf("error when serving connection %q<->%q: %s", c.LocalAddr(), c.RemoteAddr(), err) } } |