pub fn validate_request_body(
content_length: Option<&str>,
transfer_encoding: Option<&str>,
max_body_bytes: u64,
) -> Result<(), RequestValidationError>Expand description
Validate that a request has no body, as expected for GET/HEAD.
Checks:
- No
Content-LengthandTransfer-Encodingtogether - No non-empty
Transfer-Encoding Content-Length(if present) is zero or valid and withinmax_body_bytes