Skip to main content

read_request

Function read_request 

Source
pub fn read_request(
    r: impl Read + Send + 'static,
    max_header_bytes: usize,
) -> Result<ParsedRequest, ParseError>
Expand description

Parse an HTTP/1.1 request from r.

Port of Go’s readRequest(b *bufio.Reader) (*Request, error). Reads the request line, validates the method and proto, reads headers, then resolves the body framing.