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

DefaultServiceUnavailableRetryStrategy does not respect HttpEntity#isRepeatable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.5.3
    • 4.5.4
    • HttpClient (classic)
    • None
    • Any environment
    • Patch

    Description

      The HttpEntity interface provides a method for indicating whether or not an entity can be automatically retried. While investigating an issue with corruption of encrypted uploads in the java-manta library I discovered that requests were being automatically retried in the event of a 503 response from the server. Stepping through the execution path led me to discover that ServiceUnavailableRetryExec does not check the supplied HttpRequest to determine whether or not it can be safely retried. We've implemented a fix within java-manta in our subcclass of DefaultServiceUnavailableRetryStrategy but this seems like it could bite others as well so I thought it would merit a bug report.

      The included patch corrects this behavior. Checked that mvn verify completes successfully. Please let me know if there are any questions or other modifications that I need to make in order to contribute this patch.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tjcelaya Tomas Celaya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: