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

   RFC 9113, section 6.9.1 requires that a receiver treat the receipt of a 
flow-controlled frame that violates the advertised flow-control window as a 
connection error (GOAWAY) of type FLOW_CONTROL_ERROR.
   
   Http2Parser was throwing StreamException, which results in RST_STREAM, 
instead of ConnectionException, which results in GOAWAY.RFC 9113, section 6.9.1 
states:
   
   > A receiver MUST treat the receipt of a flow-controlled frame that violates 
the advertised flow-control window as a connection error (Section 5.4.1) of 
type FLOW_CONTROL_ERROR.
   
   `Http2Parser` was throwing `StreamException` (RST_STREAM) instead of 
`ConnectionException` (GOAWAY) when a DATA frame arrived whose length exceeded 
the remaining capacity of the stream's advertised flow-control window.
   
   The fix changes the single throw site to use `ConnectionException` with 
`FLOW_CONTROL_ERROR`, producing the GOAWAY required by the RFC.
   
   A new test, `testDataFrameExceedsFlowControlWindow` in 
`TestHttp2Section_6_9`, configures the server with a 1 kB initial flow-control 
window, sends 2 kB of DATA on an open stream, and verifies that the server 
responds with GOAWAY(FLOW_CONTROL_ERROR) rather than 
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