diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2018-08-26 16:07:42 +0800 |
---|---|---|
committer | Kirill Danshin <kirill@danshin.pro> | 2018-08-27 21:30:11 +0000 |
commit | fbf4b2d9cd9a9bb84baf187775bf90cab15a3728 (patch) | |
tree | cfd4c23e3b050225d0acf7bb743473b49efd9eba /workerpool.go | |
parent | Added atreugo micro-framework in README (diff) | |
download | fasthttp-fbf4b2d9cd9a9bb84baf187775bf90cab15a3728.tar.gz fasthttp-fbf4b2d9cd9a9bb84baf187775bf90cab15a3728.tar.bz2 fasthttp-fbf4b2d9cd9a9bb84baf187775bf90cab15a3728.zip |
Do not log ErrSmallBuffer for request headers
fasthttp returns a 431 error when the request headers are too large.
Most other HTTP servers do not log an error when the request header
exceeds the limit. When serving HTTP requests directly to browsers,
it is normal to occasionally hit the limit due to broken browsers
or broken sites linking to your resource. These issues are generally
outside of your control in the same way the already ignored errors are.
Diffstat (limited to 'workerpool.go')
-rw-r--r-- | workerpool.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/workerpool.go b/workerpool.go index 081ac65..6ce2778 100644 --- a/workerpool.go +++ b/workerpool.go @@ -211,6 +211,7 @@ func (wp *workerPool) workerFunc(ch *workerChan) { errStr := err.Error() if wp.LogAllErrors || !(strings.Contains(errStr, "broken pipe") || strings.Contains(errStr, "reset by peer") || + strings.Contains(errStr, "request headers: small read buffer") || strings.Contains(errStr, "i/o timeout")) { wp.Logger.Printf("error when serving connection %q<->%q: %s", c.LocalAddr(), c.RemoteAddr(), err) } |