Skip to main content

read_error_response

Function read_error_response 

Source
pub fn read_error_response(e: &ParseError) -> HttpResponse
Expand description

Map a request read error to the response the server writes: an oversized BODY (a declared Content-Length past the cap) is a defined 413 (never buffered / never dispatched) so a client can tell “too big” from “malformed”. Everything else — including an oversized HEADER block, whose head the server cannot even parse — is the malformed 400 (the shape the cross-tier http_differential lock pins). THE shared read-error law both the tokio and io_uring engines apply so their refusals are identical.