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

   RFC 9113, section 5.1 requires DATA frames that arrive on a stream the 
server has already reset to be ignored, as the client sent them before it saw 
the reset.
   
   When a stream is closed before any DATA frame has been processed, 
Stream.replace() creates the RecycledStream with no flow control window left, 
so any DATA that is still in flight is answered with RST_STREAM 
(FLOW_CONTROL_ERROR). Each of those counts towards the overhead limit, so after 
a few frames the connection is closed with GOAWAY (ENHANCE_YOUR_CALM), which 
also kills every other stream on it. This happens, for example, when a request 
is rejected without its body being read.
   
   As no DATA has been received, the client still has the whole initial window 
available. Create the RecycledStream with it. A client that really exceeds the 
window is still reset.
   
   Checked against a running Tomcat with a raw HTTP/2 client, sending DATA to a 
stream the server had just reset: without the change 100 bytes already got a 
RST_STREAM, and 49 KiB (inside the window) got two of them and a GOAWAY that 
closed the connection. With it the frames are ignored and the connection stays 
usable. 80 KiB, which exceeds the window, is still reset. The HTTP/2 test suite 
passes.
   
   This is the stream the server reset (CLOSED_RST_TX), not the one handled by 
#1129.


-- 
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