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 neil al <nv...@gmail.com> on 2006/06/29 14:45:45 UTC

Question about SocketException: connection reset

Hi,

I am a beginner on httpclient and I would like to know what is the cause of
a SocketException? Is it okay to trap the SocketException on my
HttpMethodRetryHandler and retry the connection again?

Thank you very much.

Re: Question about SocketException: connection reset

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2006-06-29 at 20:45 +0800, neil al wrote:
> Hi,
> 
> I am a beginner on httpclient and I would like to know what is the cause of
> a SocketException? Is it okay to trap the SocketException on my
> HttpMethodRetryHandler and retry the connection again?
> 

SocketException indicates there is a problem with the network
connection. The exact nature of the problem can be determined by the
exception subtype or the error message.

Generally it is safe to retry GET methods and unsafe to retry POST and
PUT methods unless special precautions are taken. For detailed
discussion of method recovery strategies see

http://jakarta.apache.org/commons/httpclient/exception-handling.html#HTTP%20transport%20safety

Hope this helps

Oleg

> Thank you very much.


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