RFR: 8367976: Validate and clamp jdk.httpclient.bufsize [v3]
Daniel Fuchs
dfuchs at openjdk.org
Tue Oct 21 09:34:14 UTC 2025
On Mon, 20 Oct 2025 17:49:23 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Apply property doc suggestion
>>
>> Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
>
> test/jdk/java/net/httpclient/BufferSize1Test.java line 108:
>
>> 106: if (response.statusCode() != 200) {
>> 107: throw new AssertionError("Was expecting status code 200, found: " + response.statusCode());
>> 108: }
>
> It would be good to send at least two requests.
> I am not sure the test tests what it says it does - the HEAD request has no bodies in either ways.
@dfuch, mind sharing what does this exactly help with?
Remember the h2c upgrade? The first request is upgrading, the second is upgraded. That takes different paths.
Also the first request always establishes the connection, the second reuses it. That's also a different path.
Different paths don't necessary means that the code that use bufsize will be different, but it could mean different timing, different places where exceptions might get caught and propagated (if any).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27874#discussion_r2447487266
More information about the net-dev
mailing list