-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
The HttpClient may reset streams or close the connection if flow control errors are detected. This should be mostly transparent to users of the API, unless when connecting to non-conformant HTTP/2 server.
-
System or security property
-
JDK
Summary
java.net.http module-info clarifies the behaviour of the default HTTP/2 implementation when invalid window sizes are specified via system properties.
Problem
The current specification of jdk.httpclient.connectionWindowSize
and jdk.httpclient.windowsize
does not specify the full range of valid value and is unclear about what happens when a value out of range is specified
Solution
For these two properties, specify the range of valid values, and specify what happens if a value out of range is provided. In addition, flow control violations will be reported to the server. This second part is an implementation detail that should be transparent to users of the API, but will be covered in a release note.
Specification
* <li><p><b>{@systemProperty jdk.httpclient.connectionWindowSize}</b> (default: 2^26)<br>
- * The HTTP/2 client connection window size in bytes. The maximum size is 2^31-1. This value
- * cannot be smaller than the stream window size, which can be configured through the
- * {@code jdk.httpclient.windowsize} system property.
+ * The HTTP/2 client connection window size in bytes. Valid values are in the range
+ * [2^16-1, 2^31-1]. If an invalid value is provided, the default value is used.
+ * The implementation guarantees that the actual value will be no smaller than the stream
+ * window size, which can be configured through the {@code jdk.httpclient.windowsize}
+ * system property.
* </li>
* <li><p><b>{@systemProperty jdk.httpclient.windowsize}</b> (default: 16777216 or 16 MB)<br>
- * The HTTP/2 client stream window size in bytes.
+ * The HTTP/2 client stream window size in bytes. Valid values are in the range [2^14, 2^31-1].
+ * If an invalid value is provided, the default value is used.
* </li>
- csr of
-
JDK-8342075 HttpClient: improve HTTP/2 flow control checks
- Closed