[
https://issues.apache.org/jira/browse/HTTPCLIENT-2141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17302686#comment-17302686
]
Michael Osipov commented on HTTPCLIENT-2141:
--------------------------------------------
[~olegk], this sounds like an idea, but on a second thought we are mixing two
things, aren't we?. Request config timeouts are on TCP, while the retry problem
is in HTTP. Do we really want to conflate both things? Some execs and
strategies receive configurations from {{RequestConfig}}.
Brainstorming. Add the following to the {{RequestConfigBulder}}:
* {{setMaxRetries(int)}}
* {{setRetryInterval(TimeValue)}}
and remove from {{DefaultHttpRequestRetryStrategy}}.
Default values will be the same as in {{DefaultHttpRequestRetryStrategy}}. This
would make it easier to modify DefaultHttpRequestRetryStrategy w/o to fiddle
with. Similar to redirect config options. Unfortunately, it won't solve the
issue because the code still does not know what to prefer retry interval or
{{Retry-After}} header. WDYT?
> 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]