RFR: 8293786: HttpClient will not send more than 64 kb of data from the 2nd request in http2 [v2]

Conor Cleary ccleary at openjdk.org
Fri Apr 7 13:46:51 UTC 2023


On Tue, 7 Mar 2023 15:15:10 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> To add on to the explanation given by the in-line comments. 
>> 
>> - If an END_STREAM is not seen by the `BodyInputStream`, `bis`, then the client has stopped transmitting for some reason. For example if the sendWindow has been exceeded and the client is waiting for WINDOW_UPDATE frames. This can occur if the InputStream is not fully consumed by the exchange handler too.
>> - It is possible too that the EOF has been seen but that the `BodyInputStream's` Queue is non empty. This is why an || is used instead of an &&.
>> 
>> Through testing this seems to be the most stable solution, this code usually should only get triggered in test cases including a test handler which does not consume the input stream.
>
> This is strange and probably too late: when you reach here the bos has probably already been closed by the handler, so setting the flag will have no effect in the usual case.

In the usual case yes, if the handler reads the stream this code will have no effect. I think thats what we want though as we don't want the sending of reset frame to be triggered if the server handler reads/closes the stream. It should only be sent when the stream has not been closed/consumed by the handler and the exchanges send window has been exceeded.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/12694#discussion_r1160709736


More information about the net-dev mailing list