Skip to content

mux-h2: frames on refused streams are not ignored like frames on reset streams #1815

Closed

Description

@FlorentinDUBOIS

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

  1. added a commit that references this issue on Oct 4, 2026
    bd19a78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions