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

HTTP client should set "Connection: close" header in request when keepalive is disabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • core-libs
    • beta
    • generic
    • generic

      According to the HTTP spec defined in RFC 2616, "HTTP/1.1 applications that do not support persistent connections should include the "close" connection option in every message."

      J2SE's HTTP client has a http.keepAlive property for applications to disable HTTP keep-alive in HTTP/1.1. But it doesn't send the "close" connection option header in HTTP requests. The problem with the current situation is that with http.keepAlive set to false, even though HTTP client closed the connection after each HTTP response, the server side is not notified of this fact, thus it may still keep the connection open. this will at least affect performance, and may impact the correct behaviour of the server.
      ###@###.### 11/2/04 02:05 GMT

            yuwangsunw Yujiang Wang (Inactive)
            ywangsunw Yingxian Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: