arturobernalg opened a new pull request, #1131:
URL: https://github.com/apache/tomcat/pull/1131

   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)`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to