RFR: 8328919: Add BodyHandlers / BodySubscribers methods to handle excessive server input [v10]

Jaikiran Pai jpai at openjdk.org
Tue Jan 21 15:19:40 UTC 2025


On Tue, 21 Jan 2025 14:43:15 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> Volkan Yazıcı has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Fix `assertThrows` in `HttpResponseLimitingTest`
>>  - Fix `HttpResponseLimitingTest` license header
>
> test/jdk/java/net/httpclient/HttpResponseLimitingTest.java line 70:
> 
>> 68: import static org.junit.jupiter.api.Assertions.assertThrows;
>> 69: 
>> 70: class HttpResponseLimitingTest {
> 
> I think we should also add test methods to verify that the newly added methods throw a `NullPointerException` and `IllegalArgumentException` for incorrect parameters.

Finally, I think we should also add a test method which verifies that a limiting BodyHandler with a specific capacity doesn't impact the headers from being delivered to the downstream/wrapped BodyHandler even if the size of the response headers exceeds the given capacity.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23096#discussion_r1923915585


More information about the net-dev mailing list