Skip to main content

MAX_BODY_BYTES

Constant MAX_BODY_BYTES 

Source
pub const MAX_BODY_BYTES: usize = _ /* 262_144usize */;
Available on crate feature server only.
Expand description

Maximum accepted request-body size (SPEC §12.2), applied by HttpsServer::into_router. Trust Task payloads are small; 256 KiB is generous headroom while bounding pre-auth memory use. Callers needing a different bound can rebuild the router with their own DefaultBodyLimit layer — which is why the value is public: a caller replacing the layer wants to know what it is replacing.