Skip to main content

REQUEST_READ_TIMEOUT

Constant REQUEST_READ_TIMEOUT 

Source
pub const REQUEST_READ_TIMEOUT: Duration;
Expand description

Maximum wall-clock time the server will spend reading a single request frame before abandoning the stream and releasing its semaphore permit.

SECURITY (#159): without this bound an UNAUTHENTICATED peer can open DEFAULT_STREAM_LIMIT bidi streams, send one byte on each, and stall — each stalled read holds a server-wide permit forever, wedging the whole server before any envelope is verified (a pre-auth slowloris) and hanging the shutdown drain. Bounding the total read (not just per-read() idle) also defeats a trickle attacker who dribbles one byte per idle window.