-
Sub-task
-
Resolution: Delivered
-
P4
-
17.0.17-oracle
The `java.net.http.HttpClient` will now report HTTP/2 flow control errors to the server when they are detected. This is an implementation detail that should be transparent to users of the `HttpClient` API, but could result in streams being reset or connections being closed if connecting to a non-conformant HTTP/2 server.
The flow control limits enforced by the client can be specified with two system properties, which can be set on the java command line:
- `jdk.httpclient.connectionWindowSize` specifies the HTTP/2 client connection window size in bytes. The default value if unspecified is `2^26`. 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 `jdk.httpclient.windowsize` system property.
- `jdk.httpclient.windowsize` specifies the HTTP/2 client stream window size in bytes. The default value if unspecified is `16777216` or `16 MB`. Valid values are in the range `[2^14, 2^31-1]`. If an invalid value is provided, the default value is used.
The flow control limits enforced by the client can be specified with two system properties, which can be set on the java command line:
- `jdk.httpclient.connectionWindowSize` specifies the HTTP/2 client connection window size in bytes. The default value if unspecified is `2^26`. 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 `jdk.httpclient.windowsize` system property.
- `jdk.httpclient.windowsize` specifies the HTTP/2 client stream window size in bytes. The default value if unspecified is `16777216` or `16 MB`. Valid values are in the range `[2^14, 2^31-1]`. If an invalid value is provided, the default value is used.