Documentation
¶
Overview ¶
Package httplimit provides generic HTTP request-body limiting middleware.
Index ¶
Constants ¶
View Source
const DefaultMaxRequestBodySize int64 = 8 << 20
DefaultMaxRequestBodySize is the fail-safe cap applied when no limit is configured.
Variables ¶
This section is empty.
Functions ¶
func IsRequestTooLarge ¶
IsRequestTooLarge reports whether err is an http.MaxBytesReader overflow.
func Middleware ¶
Middleware returns middleware that rejects bodies with a declared Content-Length larger than maxBytes before dispatch. Bodies with unknown or understated lengths are limited when downstream handlers read them. Non-positive limits fall back to DefaultMaxRequestBodySize.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.