Skip to main content

HEADER_TIMEOUT

Constant HEADER_TIMEOUT 

Source
pub const HEADER_TIMEOUT: Duration;
Available on crate feature tls only.
Expand description

How long a connection has, after the handshake, to send request headers.

The handshake deadline covers TLS and stops there. Without this one, a client that completes a handshake and then sends no request bytes — or drips an incomplete header a byte at a time — holds a socket and a task for as long as it likes, which is the exhaustion HANDSHAKE_TIMEOUT exists to prevent, moved one step further in.

It bounds headers, not the request as a whole: a stream’s response body is meant to run for days, and this deadline stops before the first byte of one is written.