hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1800) Why is Retry around Redirect and not the other way round
Date Thu, 05 Jan 2017 16:01:02 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15801725#comment-15801725

ASF GitHub Bot commented on HTTPCLIENT-1800:

GitHub user nstaeger opened a pull request:


    HTTPCLIENT-1800: wrap redirect around retry in execChain

    Fixes https://issues.apache.org/jira/browse/HTTPCLIENT-1800

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nstaeger/httpclient issue-HTTPCLIENT-1800

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #62
commit e8e513db86a6f3c68a22a1328504f62dd85a6108
Author: nstaeger <mail@nstaeger.de>
Date:   2017-01-05T15:57:24Z

    HTTPCLIENT-1800: wrap redirect around retry in execChain


> Why is Retry around Redirect and not the other way round
> --------------------------------------------------------
>                 Key: HTTPCLIENT-1800
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1800
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 4.5.2
>            Reporter: Nicolai St├Ąger
>             Fix For: 4.5.3, 5.0 Alpha2
> I am wondering, why the ServiceUnavailableRetryExec is before the RedirectExec in the
execChain of the the InternalHttpClient. I am referring to the HttpClientBuilder.build() method
where the execChain is put together something like this:
> Client -> ... -> ServiceUnavailableRetryExec -> RedirectExec -> ...
> We have the following scenario, where this causes an unexpected behavior and changing
the order would solve this:
> 1. We are sending a request to endpoint A which returns a 303 with the endpoint B in
the location-header
> 2. The RedirectExec redirects the request to B what returns a 503
> 3. Now the ServiceUnavailableRetryExec is doing its thing but retries to endpoint A
> I would expect the behavior of the client to retry to endpoint B instead of A. Is there
a reason why the chain is implemented this way around or is this a "bug".
> Any help very appreciated!

This message was sent by Atlassian JIRA

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

View raw message