You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Joan Balagueró <jo...@grupoventus.com> on 2009/01/31 11:28:55 UTC

HTTPCLIENT4 EXCEPTIONS

Hello,

 

Just a question about exceptions sending http requests. 

 

If I set a very low value to
HttpConnectionParams.setConnectionTimeout(this.objHttpParams,
connectionTimeout), httpclient throws “SocketTimeoutException” with the
message “connect timed out”, but I expected to receive a
“ConnectTimeoutException” (as HttpClient3).  Is this right?

 

The problem is that a response timeout also throws “SocketTimeoutException”
(with the message “Read timed out”, as expected). Then, should I read the
exception message to know which exception was thrown?

 

Thanks,

 

Joan. 

 


Re: HTTPCLIENT4 EXCEPTIONS

Posted by Oleg Kalnichevski <ol...@apache.org>.
Joan Balagueró wrote:
> Hello,
> 
>  
> 
> Just a question about exceptions sending http requests. 
> 
>  
> 
> If I set a very low value to
> HttpConnectionParams.setConnectionTimeout(this.objHttpParams,
> connectionTimeout), httpclient throws “SocketTimeoutException” with the
> message “connect timed out”, but I expected to receive a
> “ConnectTimeoutException” (as HttpClient3).  Is this right?
> 


No, it is not. Please open a bug report in Jira for this issue

https://issues.apache.org/jira/browse/HTTPCLIENT

Oleg

>  
> 
> The problem is that a response timeout also throws “SocketTimeoutException”
> (with the message “Read timed out”, as expected). Then, should I read the
> exception message to know which exception was thrown?
> 
>  
> 
> Thanks,
> 
>  
> 
> Joan. 
> 
>  
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org