Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8357154

HttpClient: improve HTTP/2 flow control checks

XMLWordPrintable

    • 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

      Improves the flow control in the HTTP/2 implementation. FLOW_CONTROL_ERROR is sent to the server when encountering flow control issues.

      Problem

      The HttpClient client supports two undocumented properties to control flow control limits imposed by the client:

      • jdk.httpclient.connectionWindowSize: to control the connection window
      • jdk.httpclient.windowsize: to control the stream window

      The HttpClient doesn't send FLOW_CONTROL_ERROR to the server when these limits are crossed.

      Solution

      The client will now be sending FLOW_CONTROL_ERROR to the server when it detects that the limits are crossed. The range of valid values, as well as the behavior of the client when an out of range value is provided for any of those two properties will be clarified in release notes. Versions of the JDK prior to JDK 21 do not document any system properties in the java.net.http module-info API documentation. In later version of the JDK (JDK 21 onwards), these properties are documented in the java.net.http module-info API documentation.

      Specification

      There is no specification change - the change in behavior will be documented in release notes.

            wxiao Weibing Xiao
            dfuchs Daniel Fuchs
            Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: