Author: olegk
Date: Tue Sep 13 11:41:21 2005
New Revision: 280621

URL: http://svn.apache.org/viewcvs?rev=280621&view=rev
Log:
PR #36595 (DefaultHttpMethodRetryHandler does not check whether the failed 
method has been aborted)

Contributed by Oleg Kalnichevski
Reviewed by Michael Becke and Ortwin Glück

Modified:
    
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java?rev=280621&r1=280620&r2=280621&view=diff
==============================================================================
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java
 Tue Sep 13 11:41:21 2005
@@ -91,6 +91,12 @@
         if (exception == null) {
             throw new IllegalArgumentException("Exception parameter may not be 
null");
         }
+        // HttpMethod interface is the WORST thing ever done to HttpClient
+        if (method instanceof HttpMethodBase) {
+               if (((HttpMethodBase)method).isAborted()) {
+                return false;
+               }
+        }
         if (executionCount > this.retryCount) {
             // Do not retry if over max retry count
             return false;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to