Repository navigation
Treat SETTINGS_INITIAL_WINDOW_SIZE overflow as a connection error - #1131
Open
arturobernalg wants to merge 1 commit into
Open
arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
Per RFC 9113 section 6.9.2, a change to SETTINGS_INITIAL_WINDOW_SIZE that causes any flow-control window to exceed the maximum size must be treated as a connection error of type FLOW_CONTROL_ERROR. The previous code closed only the affected stream with RST_STREAM, which is a stream error and not compliant with the specification.
arturobernalg
force-pushed
the
rfc9113-settings-window-size-overflow
branch
from
October 30, 2026 11:23
07afb52 to
c3f6d1f
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.
Per RFC 9113 section 6.9.2, a change to
SETTINGS_INITIAL_WINDOW_SIZEthat causes any flow-control window to exceed the maximum size must be treated as a connection error of typeFLOW_CONTROL_ERROR.The previous code caught the exception from
incrementWindowSize()in theSETTINGS_INITIAL_WINDOW_SIZEhandler and wrapped it in aStreamException, causing the server to close only the affected stream withRST_STREAM. This is a stream error, not the connection error the RFC mandates.Fix:
Http2UpgradeHandler.setting()now throwsConnectionException(FLOW_CONTROL_ERROR)when a stream window overflows due to the settings change. The connection is closed with aGOAWAYframe as required.Test:
TestHttp2Section_6_9.testWindowSizeTooLargeViaSettingsis corrected to expectGOAWAY(FLOW_CONTROL_ERROR)instead ofRST_STREAM(FLOW_CONTROL_ERROR).