commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r280621 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java
Date Tue, 13 Sep 2005 18:41:25 GMT
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


Mime
View raw message