Repository navigation
Treat RST_STREAM with wrong payload size as a connection error - #1128
Closed
arturobernalg wants to merge 1 commit into
Closed
arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
RFC 9113, section 6.4 requires that a RST_STREAM frame whose length is other than 4 octets be treated as a connection error of type FRAME_SIZE_ERROR. The previous FrameType declaration set payloadErrorFatal to false for RST, which caused the frame-size check in FrameType.check() to throw a StreamException (stream error) instead of a ConnectionException (connection error). As a result, Tomcat replied with a RST_STREAM rather than a GOAWAY frame. Fix: set payloadErrorFatal to true for FrameType.RST so that an oversized or undersized RST_STREAM payload always triggers a GOAWAY. Update TestHttp2Section_6_4#testResetFrameWrongLength to assert the correct GOAWAY response with error code FRAME_SIZE_ERROR.
arturobernalg
force-pushed
the
rfc9113-rst-frame-size-error
branch
from
October 29, 2026 13:38
e0b5090 to
f4f543c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 9113, section 6.4 requires that a RST_STREAM frame whose length is other than 4 octets be treated as a connection error of type FRAME_SIZE_ERROR. The previous FrameType declaration set payloadErrorFatal to false for RST, which caused the frame-size check in FrameType.check() to throw a StreamException (stream error) instead of a ConnectionException (connection error). As a result, Tomcat replied with a RST_STREAM rather than a GOAWAY frame.
Fix: set payloadErrorFatal to true for FrameType.RST so that an oversized or undersized RST_STREAM payload always triggers a GOAWAY.
Update TestHttp2Section_6_4#testResetFrameWrongLength to assert the correct GOAWAY response with error code FRAME_SIZE_ERROR.