pub fn parse_body_with_consumed(
buffer: &[u8],
body_length: BodyLength,
config: &BodyConfig,
) -> Result<(Option<Vec<u8>>, usize), BodyError>Expand description
Parse a request body and return both the decoded body and bytes consumed.
This is useful for incremental parsing to determine request boundaries.
ยงErrors
Returns an error if:
- The body exceeds the configured size limit
- The chunked encoding is malformed
- The buffer is incomplete