Skip to content

Comments

Enforce RST_STREAM payload length regardless of stream existence#638

Open
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:RST_STREAM
Open

Enforce RST_STREAM payload length regardless of stream existence#638
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:RST_STREAM

Conversation

@arturobernalg
Copy link
Member

RFC9113 6.4. RST_STREAM A RST_STREAM frame with a length other than 4 octets MUST be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.

RFC 9113 requires RST_STREAM frames to carry exactly 4 octets of payload; otherwise the endpoint MUST
treat it as a connection error of type FRAME_SIZE_ERROR.
@arturobernalg arturobernalg requested a review from ok2c February 23, 2026 14:45
throw new H2ConnectionException(H2Error.FRAME_SIZE_ERROR, "Invalid RST_STREAM frame payload");
}
final int errorCode = payload.getInt();
final int errorCode = payload.getInt(payload.position());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg Why payload.getInt(payload.position());? Was it wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants