Don't log ErrBadTrailer by default

This commit is contained in:
Erik Dubbelboer
2022-02-23 17:12:07 +01:00
parent 6937fee923
commit f0b0cfe9b2
+3 -1
View File
@@ -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)
}
}