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

CachingHttpClient should have similar behavior as AbstractHttpClient when executing with ResponseHandler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.2, 4.2 Beta1
    • 4.1.3, 4.2 Beta1
    • HttpCache

    Description

      When calling execute on the AbstractHttpClient with a ResponseHandler, the AbstractHttpClient will attempt to Consume the Entity and close any open connections before returning. This behavior is not currently in the CachingHttpClient.

      This can lead to connection leaks when switching to CachingHttpClient, becuase the responsibility to fully consume the entity is now on the ResponseHandler instead on the HttpClient.

      Here is the code that does the existing 'auto-close' behavior: "org.apache.http.impl.client.AbstractHttpClient.java" lines 1080-1111

      Attachments

        1. httpclient-1155.patch
          8 kB
          James Miller

        Activity

          People

            Unassigned Unassigned
            millerjam James Miller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: