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(h2): backend stream answered before its request was written is left open on the backend #1734
When an H2 backend stream ends, ConnectionH2::end_stream (Position::Client arm, lib/src/protocol/mux/h2.rs) skips the RST_STREAM when back_received_end_of_stream && front.is_terminated(). That condition checks that the request was received whole from the client, not that it was written whole to the backend.
A backend may send a complete response before the whole request reached it (RFC 9113 §8.1), for example while the rest of the body waits on the stream's send window. If the stream then ends, sozu drops it without sending the rest of the request and without a reset. The backend never sees END_STREAM, so the stream stays half-closed on its side and counts against its SETTINGS_MAX_CONCURRENT_STREAMS (RFC 9113 §5.1.2) for as long as the connection lives. Sozu's own slot is released, so the two views drift apart.
The stream should be reset with RST_STREAM(CANCEL) unless the request's END_STREAM was also handed to the output.
Activity
fix(h2): reset a backend stream answered before its request was written
fix(h2): reset a backend stream answered before its request was written
fix(h2): reset a backend stream answered before its request was writt…