[
https://issues.apache.org/jira/browse/HTTPCLIENT-2141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17301840#comment-17301840
]
Pierre N. commented on HTTPCLIENT-2141:
---------------------------------------
The problem is if you configure the timeout like this :
{color:#0033b3}var {color}{color:#000000}requestConfig {color}=
{color:#000000}RequestConfig{color}.custom()
.setConnectTimeout({color:#000000}timeout{color}.toMillis(),
{color:#000000}TimeUnit{color}.{color:#871094}MILLISECONDS{color})
.setConnectionRequestTimeout({color:#000000}timeout{color}.toMillis(),
{color:#000000}TimeUnit{color}.{color:#871094}MILLISECONDS{color})
.setResponseTimeout({color:#000000}timeout{color}.toMillis(),
{color:#000000}TimeUnit{color}.{color:#871094}MILLISECONDS{color});
You don't expect the http client to hang forever. That may work as intended but
as a user I think it is deceptive.
> DefaultHttpRequestRetryStrategy has no timeout on retryafter header
> -------------------------------------------------------------------
>
> Key: HTTPCLIENT-2141
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2141
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 5.0.3
> Reporter: Pierre N.
> Priority: Major
>
> In *DefaultHttpRequestRetryStrategy.java:207* value of the HTTP retry header
> of the failed server is reused as is by *HttpRequestRetryExec:143* to sleep
> the thread.
> A server returning a very far retry after header is able to block httpclient
> request indefinetly by default (and even if proper connect, connection and
> response timeouts have been set).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]