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

DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

    XMLWordPrintableJSON

Details

    Description

      DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:

      org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
      org.apache.http.impl.client.DefaultHttpClient: Retrying request

      and

      org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
      org.apache.http.impl.client.DefaultHttpClient: Retrying connect

      The abort() method sets the isAborted() flag, but the retry handler does not check it.

      Attachments

        1. no_request_in_context.patch
          1 kB
          Alin Vasile
        2. patch.diff
          7 kB
          Alin Vasile
        3. req_abort_test.patch
          3 kB
          Alin Vasile
        4. retry_handler.patch
          0.8 kB
          Alin Vasile

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: