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

Daniel Fuchs dfuchs at openjdk.org
Tue Mar 7 15:18:04 UTC 2023


On Tue, 7 Mar 2023 14:45:37 GMT, Conor Cleary <ccleary at openjdk.org> wrote:

>> On review, issue I saw may have been due to using an out of date build while running test tiers and httpclient tests. Will test further but it seems there is no issue. Especially considering the `instanceof` check should be false and the inner code is skipped.
>
> 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.

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

PR: https://git.openjdk.org/jdk/pull/12694


More information about the net-dev mailing list