On Tue, 14 Jan 2025 08:51:55 GMT, Volkan Yazıcı <[email protected]> wrote:
> Adds `limiting()` factory methods to
> `HttpResponse.Body{Handlers,Subscribers}` to handle excessive server input in
> `HttpClient`. I would appreciate your input whether `discardExcess` should be
> kept or dropped. I plan to file a CSR once there is an agreement on the PR.
src/java.net.http/share/classes/java/net/http/HttpResponse.java line 760:
> 758: * @param discardExcess if {@code true}, excessive input will be
> discarded; otherwise, it will throw an exception
> 759: * @throws IllegalArgumentException if {@code capacity < 0}
> 760: */
Suggestion:
* @since 25
*/
Same for the new factory in `BodySubscribers`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23096#discussion_r1914454528