Skip to main content

MAX_REQUEST_BODY_BYTES

Constant MAX_REQUEST_BODY_BYTES 

Source
pub const MAX_REQUEST_BODY_BYTES: usize = _; // 2_097_152usize
Expand description

Maximum bytes accepted from a request body across the framework.

The global body-limit middleware rejects any request whose Content-Length exceeds this value with Error::PayloadTooLarge (HTTP 413); the admin form reader enforces the same cap while collecting the body so chunked or mis-labelled requests can’t slip past. Custom handlers that read bodies directly should use the same constant.