RFR: 8367976: Validate and clamp jdk.httpclient.bufsize [v4]

Daniel Fuchs dfuchs at openjdk.org
Tue Oct 21 09:45:15 UTC 2025


On Tue, 21 Oct 2025 08:12:51 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> Validate and clamp the value populated from the `jdk.httpclient.bufsize` system property. Added two new tests: Does clamping work? Does the minimum value wedge the client?
>
> Volkan Yazici has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
> 
>  - Merge remote-tracking branch 'upstream/master' into bufSizeClamp
>  - Switch to POST and repeated-request in `BufferSize1Test`
>  - Apply property doc suggestion
>    
>    Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
>  - Update `module-info.java` docs
>  - Clamp `Utils::BUFSIZE`

test/jdk/java/net/httpclient/BufferSize1Test.java line 143:

> 141:     }
> 142: 
> 143:     private static final class BodyEchoingHandler implements HttpServerAdapters.HttpTestHandler {

You could simply use / extend the HttpServerAdapters.HttpTestEchoHandler;
Also consider implementing HttpServerAdapters in the test class to get rid of the leading HttpServerAdapters qualifier.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27874#discussion_r2447515837


More information about the net-dev mailing list