Skip to main content

parse_status_code

Function parse_status_code 

Source
pub fn parse_status_code(
    response: &str,
    limits: &HttpConnectLimits,
) -> Result<u16, HttpError>
Expand description

Parse the HTTP status code from a response head string.

Exposed for fuzzing; takes the full response head (status line + headers) and returns the numeric status code from the first whitespace-separated token after the HTTP version.