mirror of
https://github.com/caddyserver/caddy.git
synced 2025-04-19 18:58:50 +08:00
fix: address overlooked nil check for MaxBytesError
This commit is contained in:
parent
c9a4a20141
commit
42a3c0c4c9
@ -94,10 +94,8 @@ type errorWrapper struct {
|
||||
|
||||
func (ew errorWrapper) Read(p []byte) (n int, err error) {
|
||||
n, err = ew.ReadCloser.Read(p)
|
||||
if err != nil {
|
||||
if _, ok := err.(*http.MaxBytesError); ok {
|
||||
err = caddyhttp.Error(http.StatusRequestEntityTooLarge, err)
|
||||
}
|
||||
if _, ok := err.(*http.MaxBytesError); ok {
|
||||
err = caddyhttp.Error(http.StatusRequestEntityTooLarge, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user