2 ms·
an http request can take an unlimited amount of time to complete the initial response headers can arrive as fast as you like, but the body can be streamed, whi
by preseinger 4y ago
an http request can take an unlimited amount of time to complete
the initial response headers can arrive as fast as you like, but the body can be streamed, which can have potentially infinite data, and take potentially infinite time, and it can't be interrupted without terminating the connection altogether
(before you say it: streaming response bodies are in no way abnormal, and can't be dismissed as irrelevant)
as http/1 serializes requests over connections (even with chunking or whatever else) clients cannot in general re-use connections for independent requests for this reason (and others)
if a client makes request A at t=1 and request B at t=2, and request A creates an unbounded length SSE response that lasts until t=999, request B should not need to wait until t=1000 to begin, yet this is what http/1 requires