Skip to main content

read_request

Function read_request 

Source
pub fn read_request(stream: &TcpStream) -> Result<Request, String>
Expand description

Read one request off a stream.

content-length is honoured exactly. Reading “until it stops” would work right up until a client keeps the connection open, and then the gateway blocks forever on a request it already has in full.