Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1507

Quick start comments do not correspond to user guide

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.3.3
    • 4.3.4
    • Documentation
    • None

    Description

      Quick start says:

      // The underlying HTTP connection is still held by the response object
      // to allow the response content to be streamed directly from the network socket.
      // In order to ensure correct deallocation of system resources
      // the user MUST either fully consume the response content or abort request
      // execution by calling CloseableHttpResponse#close().

      but the user guide says:

      The difference between closing the content stream and closing the response is that the former will attempt to keep the underlying connection alive by consuming the entity content while the latter immediately shuts down and discards the connection.

      This is a contradiction. The code which follows in the quick start is correct but not the comment. Even if I consume the response content the underlying connection is still help open.

      Attachments

        Activity

          People

            Unassigned Unassigned
            michael-o Michael Osipov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: