On Wed, Mar 9, 2011 at 3:02 PM, Razvan Mihailescu <
[email protected]> wrote:

> You may need to implement your own HttpRequestRetryHandler, as the one
> provided by default by http-client does a number of retries by default -
> DefaultHttpRequestRetryHandler.
> You will need to set the new retry handler property on your HttpClient. See
> AbstractHttpClient setHttpRequestRetryHandler method.
>

Thanks for your answer. I am aware that I can somehow configure it (now I
know I have to implement my own HttpRequestRetryHandler) but I would expect
that DefaultHttpClient works like standards say: not to retry POST method.
This should be default behavior of the DefaultHttpClient without any extra
configuration. But I may be wrong. If so, please tell me why.

Thanks :-)


> -----Original Message-----
> From: Martin Ždila [mailto:[email protected]]
> Sent: Wednesday, March 09, 2011 3:08 PM
> To: [email protected]
> Subject: HttpPost is being retried
>
> Hello
>
> We are using HttpPost method with DefaultHttpClient. The server processing
> takes couple of minutes without any response during this time. I would
> expect the HttpPost execution to timeout because POST method is not
> repeatable. Instead it is repeated. Is this a bug?
>
> 9.3.2011 13:45:34 org.apache.http.impl.client.DefaultRequestDirector
> execute
> INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when
> processing request: The target server failed to respond
> 9.3.2011 13:45:34 org.apache.http.impl.client.DefaultRequestDirector
> execute
> INFO: Retrying request
> 9.3.2011 13:48:55 org.apache.http.impl.client.DefaultRequestDirector
> execute
> INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when
> processing request: The target server failed to respond
> 9.3.2011 13:48:55 org.apache.http.impl.client.DefaultRequestDirector
> execute
> INFO: Retrying request
> ... (loops forever)
>
> Thanks in advnce
> Best regards
> --
> Ing. Martin Ždila
> tel:+421-908-363-848
> mailto:[email protected]
> http://www.zdila.sk/
>
>
> This email is subject to Computaris email terms of use:
> http://www.computaris.com/email_terms
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Ing. Martin Ždila
CTO

M-Way Solutions Slovakia s.r.o.
Letná 27, 040 01 Košice
Slovakia

tel:+421-908-363-848
mailto:[email protected]
http://www.mwaysolutions.com

Reply via email to