Skip to content

Commit f0b0cfe

Browse files
Don't log ErrBadTrailer by default
1 parent 6937fee commit f0b0cfe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

workerpool.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package fasthttp
22

33
import (
4+
"errors"
45
"net"
56
"runtime"
67
"strings"
@@ -226,7 +227,8 @@ func (wp *workerPool) workerFunc(ch *workerChan) {
226227
strings.Contains(errStr, "reset by peer") ||
227228
strings.Contains(errStr, "request headers: small read buffer") ||
228229
strings.Contains(errStr, "unexpected EOF") ||
229-
strings.Contains(errStr, "i/o timeout")) {
230+
strings.Contains(errStr, "i/o timeout") ||
231+
errors.Is(err, ErrBadTrailer)) {
230232
wp.Logger.Printf("error when serving connection %q<->%q: %s", c.LocalAddr(), c.RemoteAddr(), err)
231233
}
232234
}

0 commit comments

Comments
 (0)