Index: /home/oglueck/projects/httpclient-3/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java =================================================================== --- /home/oglueck/projects/httpclient-3/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java (revision 209598) +++ /home/oglueck/projects/httpclient-3/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java (working copy) @@ -31,6 +31,7 @@ import java.io.IOException; import java.io.InterruptedIOException; +import java.net.NoRouteToHostException; import java.net.UnknownHostException; /** @@ -57,7 +58,9 @@ private boolean requestSentRetryEnabled; /** - * Default constructor + * Creates a new DefaultHttpMethodRetryHandler. + * @param retryCount the number of times a method will be retried + * @param requestSentRetryEnabled if true, methods that have successfully sent their request will be retried */ public DefaultHttpMethodRetryHandler(int retryCount, boolean requestSentRetryEnabled) { super(); @@ -66,7 +69,8 @@ } /** - * Default constructor + * Creates a new DefaultHttpMethodRetryHandler that retries up to 3 times + * but does not retry methods that have successfully sent their requests. */ public DefaultHttpMethodRetryHandler() { this(3, false); @@ -103,6 +107,10 @@ // Unknown host return false; } + if (exception instanceof NoRouteToHostException) { + // Host unreachable + return false; + } if (SSL_HANDSHAKE_EXCEPTION != null && SSL_HANDSHAKE_EXCEPTION.isInstance(exception)) { // SSL handshake exception return false; Index: /home/oglueck/projects/httpclient-3/src/java/org/apache/commons/httpclient/HttpMethodDirector.java =================================================================== --- /home/oglueck/projects/httpclient-3/src/java/org/apache/commons/httpclient/HttpMethodDirector.java (revision 209598) +++ /home/oglueck/projects/httpclient-3/src/java/org/apache/commons/httpclient/HttpMethodDirector.java (working copy) @@ -431,7 +431,7 @@ throw e; } if (LOG.isInfoEnabled()) { - LOG.info("I/O exception caught when processing request: " + LOG.info("I/O exception ("+ e.getClass().getName() +") caught when processing request: " + e.getMessage()); } if (LOG.isDebugEnabled()) {