Skip to content

Commit

Permalink
Don't log ErrBadTrailer by default
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdubbelboer committed Feb 23, 2022
1 parent 6937fee commit f0b0cfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workerpool.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fasthttp

import (
"errors"
"net"
"runtime"
"strings"
Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit f0b0cfe

Please sign in to comment.