Skip to main content

parse_response_headers

Function parse_response_headers 

Source
pub fn parse_response_headers(block: &[u8]) -> Result<Builder, ParseError>
Expand description

Build an http::response::Builder from an RFC 3875 header block. Status resolution:

  • Status: 200 OK โ†’ status code (CGI-specific header, not an HTTP/1.1 status line).
  • Location: /... without a Status: โ†’ 302 Found.
  • No Status:, no Location: โ†’ 200 OK.

Other headers pass through untouched.

ยงErrors

As ParseError.