8371950: The jdk.httpclient.keepalive.timeout system networking property does not specify the behaviour for values <= 0

Reviewed-by: jpai, michaelm, vyazici
This commit is contained in:
Daniel Fuchs 2026-02-16 10:56:29 +00:00
parent cf0275d665
commit 1a16c0dbaa
2 changed files with 16 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -68,6 +68,8 @@
* <p> Unless otherwise stated, {@code null} parameter values will cause methods
* of all classes in this package to throw {@code NullPointerException}.
*
* @see java.net.http/
*
* @spec https://www.rfc-editor.org/info/rfc9114
* RFC 9114: HTTP/3
* @spec https://www.rfc-editor.org/info/rfc7540

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,7 @@
*/
/**
* Defines the HTTP Client and WebSocket APIs.
* Defines the {@linkplain java.net.http HTTP Client and WebSocket APIs}.
* <p>
* <b id="httpclientprops">System properties used by the java.net.http API</b>
* <p>
@ -144,15 +144,21 @@
* The value for HTTP/2 and HTTP/3 can be overridden with the
* {@code jdk.httpclient.keepalive.timeout.h2} and {@code jdk.httpclient.keepalive.timeout.h3}
* properties respectively. The value specified for HTTP/2 acts as default value for HTTP/3.
* If the provided value is negative, the default value is used.
* A value of 0 is valid and has no special meaning other than the connection is closed
* when it becomes idle.
* </li>
* <li><p><b>{@systemProperty jdk.httpclient.keepalive.timeout.h2}</b> (default: see
* below)<br>The number of seconds to keep idle HTTP/2 connections alive. If not set, then the
* {@code jdk.httpclient.keepalive.timeout} setting is used.
* below)<br>The number of seconds to keep idle HTTP/2 connections alive. If not set, or negative,
* then the {@code jdk.httpclient.keepalive.timeout} setting is used.
* A value of 0 is valid and has no special meaning other than the connection is closed
* when it becomes idle.
* </li>
* <li><p><b>{@systemProperty jdk.httpclient.keepalive.timeout.h3}</b> (default: see
* below)<br>The number of seconds to keep idle HTTP/3 connections alive. If not set, then the
* {@code jdk.httpclient.keepalive.timeout.h2} setting is used.
* </li>
* below)<br>The number of seconds to keep idle HTTP/3 connections alive. If not set,
* or negative, then the {@code jdk.httpclient.keepalive.timeout.h2} setting is used.
* A value of 0 is valid and has no special meaning other than the connection is closed
* when it becomes idle.
* <li><p><b>{@systemProperty jdk.httpclient.maxframesize}</b> (default: 16384 or 16kB)<br>
* The HTTP/2 client maximum frame size in bytes. The server is not permitted to send a frame
* larger than this.