Skip to content

Treat SETTINGS_INITIAL_WINDOW_SIZE overflow as a connection error - #1131

Open
arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:rfc9113-settings-window-size-overflow
Open

arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:rfc9113-settings-window-size-overflow

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

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 caught the exception from incrementWindowSize() in the SETTINGS_INITIAL_WINDOW_SIZE handler and wrapped it in a StreamException, causing the server to close only the affected stream with RST_STREAM. This is a stream error, not the connection error the RFC mandates.

Fix: Http2UpgradeHandler.setting() now throws ConnectionException(FLOW_CONTROL_ERROR) when a stream window overflows due to the settings change. The connection is closed with a GOAWAY frame as required.

Test: TestHttp2Section_6_9.testWindowSizeTooLargeViaSettings is corrected to expect GOAWAY(FLOW_CONTROL_ERROR) instead of RST_STREAM(FLOW_CONTROL_ERROR).

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
arturobernalg force-pushed the rfc9113-settings-window-size-overflow branch from 07afb52 to c3f6d1f Compare October 30, 2026 11:23
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.

1 participant