hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Laurent (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCLIENT-989) DefaultHttpRequestRetryHandler must not retry non-idempotent http methods (violates RFC 2616)
Date Tue, 07 Sep 2010 20:48:37 GMT
DefaultHttpRequestRetryHandler must not retry non-idempotent http methods (violates RFC 2616)

                 Key: HTTPCLIENT-989
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-989
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.1 Alpha2, 4.0.1
            Reporter: Sylvain Laurent

In DefaultHttpRequestRetryHandler, in case of NoHttpResponseException, the request is retried,
without taking into account whether the http method is idempotent or not. This violates RFC
2616 section 8.1.4 which states :
This means that clients, servers, and proxies MUST be able to recover
   from asynchronous close events. Client software SHOULD reopen the
   transport connection and retransmit the aborted sequence of requests
   without user interaction so long as the request sequence is
   idempotent (see section 9.1.2). Non-idempotent methods or sequences
   MUST NOT be automatically retried, although user agents MAY offer a
   human operator the choice of retrying the request(s).

The fix is simple : at line 94, just remove the {{if (exception instanceof NoHttpResponseException)
}} block. This way the idempotency of the method will be taken into account a bit further
in the same method.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message