RFR: 8309118: HttpClient: Add more tests for 100 ExpectContinue with HTTP/2 [v6]
Conor Cleary
ccleary at openjdk.org
Tue Oct 24 09:38:40 UTC 2023
On Tue, 24 Oct 2023 09:29:50 GMT, Conor Cleary <ccleary at openjdk.org> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/Stream.java line 619:
>>
>>> 617: }
>>> 618: if (!endStreamSeen) {
>>> 619: // If no END_STREAM flag seen, any RST_STREAM should be handled here immediately
>>
>> Suggestion:
>>
>> if (!endStreamSeen || !finalResponseCodeReceived) {
>> // If no END_STREAM flag seen, any RST_STREAM should be handled here immediately
>> // If the final response code was not received, then we should also handle
>> // the RST_STREAM immediately
>
> So by checking if the final response code is received, this makes sure that the entire block of headers is processed therfore a status code will have been received.
And then in the case where END_STREAM has already been seen, we call `requestBodyCF.complete(null);` to complete normally, as any RST_STREAM frames after an END_STREAM are not handled exceptionally.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15664#discussion_r1369876940
More information about the net-dev
mailing list