You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(h1): close without lingering after a response that completed before its request #1738
When an H1 response completes before its request was received whole (an early 413 or 401 on an upload, or a backend Connection: close response mid-upload), sozu closes the client connection as soon as the response is flushed (#1721, defer_close_for_tls_flush("request-incomplete") in lib/src/protocol/mux/h1.rs).
That close is immediate: shutdown(SHUT_WR) followed by close(2) in the same pass (HttpSession::close / HttpsSession::close). Nothing reads what the client is still sending. When the receive queue is not empty at the close, or more data arrives after it, the kernel sends a reset, which discards the part of the response still queued in sozu's socket. The client can then lose the response it was meant to read.
RFC 9112 §9.6 recommends a staged close for this case: half-close the write side, keep reading (and discarding) for a bounded time, then close.
Activity
fix(h1): keep the linger deadline and skip the linger for an unstarte…
test(mux): keep the early-wheel-delivery doc on its test
fix(h1): linger before closing a connection whose request is still ar…
fix(h1): keep the linger deadline and skip the linger for an unstarte…
test(mux): keep the early-wheel-delivery doc on its test
fix(h1): linger before closing a connection whose request is still ar…
fix(h1): keep the linger deadline and skip the linger for an unstarte…
test(mux): keep the early-wheel-delivery doc on its test
fix(h1): linger before closing a connection whose request is still ar…