DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=35642>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35642 ------- Additional Comments From [EMAIL PROTECTED] 2005-07-07 18:02 ------- (In reply to comment #2) > Created an attachment (id=15609) --> (http://issues.apache.org/bugzilla/attachment.cgi?id=15609&action=view) [edit] > Patch > > The reason for this behaviour is the implementation of the > DefaultHttpMethodRetryHandler. The attached patch solves the problem for me. > Please give it a try and give feedback. Nope, does not work for me. This is what I did: httpClient.getHttpConnectionManager().getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new RetryHandler()); where class RetryHandler extends DefaultHttpMethodRetryHandler { public RetryHandler(){ super(); } public boolean retryMethod(HttpMethod method, IOException exception, int executionCount) { if(method == null) throw new IllegalArgumentException("HTTP method may not be null"); if(exception == null) throw new IllegalArgumentException("Exception parameter may not be null"); System.out.println(exception); if(executionCount > getRetryCount()) return false; if(exception instanceof NoHttpResponseException) return true; if(exception instanceof InterruptedIOException) return false; if(exception instanceof UnknownHostException) return false; if (exception instanceof NoRouteToHostException) { // Host unreachable return false; } if(exception instanceof javax.net.ssl.SSLHandshakeException) return false; return !method.isRequestSent() || isRequestSentRetryEnabled(); } } witch does the same thing as your patch I guess. I observed some other thing. When running with the DefaultHttpMethodRetryHandler (first setup) against a machine from internet that has the web server down (not reachable even with tracert from a certain route point forward), the connect timeout fires as expected. As far as I tested, only when targeting blind hosts I have this broken behaviour. HttpClient is not based on java network libs? How come a raw connection attempt times out corectly even against a blind host? Regards, Horia -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
