HTTPCLIENT-806: DefaultHttpMethodRetryHandler will no longer retry on ConnectExceptions

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@709159 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2008-10-30 13:56:25 +00:00
parent 379a83514a
commit e69e89e496
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,10 @@
Changes since 4.0 beta 1
-------------------
* [HTTPCLIENT-806] DefaultHttpMethodRetryHandler will no longer retry
on ConnectExceptions.
Contributed by Oleg Kalnichevski <olegk at apache.org>
* DigestScheme can use an arbitrary digest algorithm requested by the
target server (such SHA) as long as this algorithm is supported by
the Java runtime.

View File

@ -33,6 +33,7 @@ package org.apache.http.impl.client;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.ConnectException;
import java.net.UnknownHostException;
import javax.net.ssl.SSLHandshakeException;
@ -101,6 +102,10 @@ public class DefaultHttpRequestRetryHandler implements HttpRequestRetryHandler {
// Unknown host
return false;
}
if (exception instanceof ConnectException) {
// Connection refused
return false;
}
if (exception instanceof SSLHandshakeException) {
// SSL handshake exception
return false;