Skip to main content

Module h1_conn

Module h1_conn 

Source
Expand description

HTTP/1.1 connection.

Simple request-response on a single ConnCtx. No multiplexing — each request blocks until its response is fully received.

Structs§

H1Conn
An HTTP/1.1 connection wrapping a ConnCtx.
H1StreamingResponse
Streaming HTTP/1.1 response. Borrows the connection exclusively.

Constants§

DEFAULT_MAX_BODY_SIZE
Default cap on the total response body length, applied to both Content-Length bodies and the cumulative size of chunked bodies.
DEFAULT_MAX_CHUNK_SIZE
Default cap on a single chunk’s data length. Bounds an attacker that claims a Transfer-Encoding: chunked body with chunk size ffffffff or larger. 16 MiB matches typical streaming buffer sizes.
DEFAULT_MAX_HEADER_SECTION
Default cap on the response header section size (status line + all header fields up to the blank line). 64 KiB is generous for real-world servers and bounds the worst case while a peer dribbles bytes in.
DEFAULT_MAX_TRAILER_SECTION
Default cap on the chunked-encoding trailer section (everything between the terminating 0\r\n and the final empty line).