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

HttpServer sets incorrect value for "max" parameter in Keep-Alive header value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 11, 17, 19
    • core-libs
    • None
    • b05

      The sun.net.httpserver.ServerImpl which is used by HttpServer and HttpsServer, sets the Keep-Alive header value. This header value is set with a "timeout" parameter and a "max" parameter. Right now, the implementation sets the value for "max" as the number of maximum idle connections that have been configured for the server. This is incorrect.

      RFC-2068 in it's section 19.7.1.1 states that HTTP/1.1 specification doesn't specify any parameters that are meant to be set in the Keep-Alive header https://www.rfc-editor.org/rfc/rfc2068#section-19.7.1.1, so that spec doesn't specify the "max" parameter.
      Other references for this parameter, like the Mozilla developer network states that the "max" value represents "An integer that is the maximum number of requests that can be sent on this connection before closing it."

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: