Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8342075 HttpClient: improve HTTP/2 flow control checks
  3. JDK-8357974

Release Note: java.net.http.HttpClient Is Enhanced to Report HTTP/2 Flow Control Errors to the Server

XMLWordPrintable

      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.

            wxiao Weibing Xiao
            wxiao Weibing Xiao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: