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
mux-h2: frames on refused streams are not ignored like frames on reset streams #1815
Streams Sōzu refuses with RST_STREAM(REFUSED_STREAM) (soft flood refusal from #1798, SETTINGS_MAX_CONCURRENT_STREAMS, graceful drain, buffer-pool exhaustion) are never registered, and ConnectionH2::enqueue_rst only records registered streams, so H2StreamTable::was_reset_locally (#1784) does not know them. Frames the client sent on such a stream before reading the refusal are therefore not ignored:
request trailers end the connection: the client reads RST_STREAM(REFUSED_STREAM), RST_STREAM(STREAM_CLOSED), then GOAWAY(PROTOCOL_ERROR) (GOAWAY(STREAM_CLOSED) once a later stream was accepted), and every other stream in flight is lost. A graceful drain can then end with PROTOCOL_ERROR instead of NO_ERROR;
each DATA frame costs one glitch and one RST_STREAM(STREAM_CLOSED) (about four for a refused 64 KiB upload).
#1798 documents this as an accepted limitation. RFC 9113 §5.1 says frames received on a stream the endpoint reset are ignored; the §5.1.1 PROTOCOL_ERROR reasoning only holds for ids the client skipped.
Proposed fix: record refused ids in the bounded recently-reset set, with its existing bound, eviction and per-stream allowances (two header blocks, DATA within the initial stream window, still credited to the connection window). HEADERS on a skipped id keeps its PROTOCOL_ERROR, and the client-reset-of-a-refused-stream detection is unchanged.
Activity
docs(mux-h2): state which refusals count a glitch, tighten refused-st…
fix(mux-h2): ignore frames on refused streams like on reset streams (s…