You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ol...@apache.org on 2005/09/13 20:41:25 UTC

svn commit: r280621 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java

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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org