RFR: 8267140: Support closing the HttpClient by making it auto-closable [v11]
Daniel Fuchs
dfuchs at openjdk.org
Thu Mar 23 09:12:51 UTC 2023
On Thu, 23 Mar 2023 07:06:59 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Daniel Fuchs has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Minor updates. Added some links
>> - Define operations. Clarify some of the things that may stall an orderly shutdown
>
> test/jdk/java/net/httpclient/AsyncShutdownNow.java line 405:
>
>> 403: String msg = "Incorrect uuid header values:[" + uuids + "]";
>> 404: (new RuntimeException(msg)).printStackTrace();
>> 405: t.sendResponseHeaders(500, -1);
>
> Given that we are writing out a response body (on the next line), should the second param here be the size of those bytes, instead of `-1`?
Here -1 only means that the body will be transmitted in chunk mode for HTTP/1, and that an additional empty DataFrame with length=0 and the FIN bit set will be sent after the message bytes when the output stream is closed for HTTP/2 - so I don't think it really matters. Both modes should work.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13019#discussion_r1145885109
More information about the net-dev
mailing list