I wanted to develop an specific RedirectStrategy, which will accept the
redirect based on the location URI returned in response.

So my idea was to override the 'isRedirected' method and, retrieve the URI
with 'getLocationURI', decide redirection based on this value and a fixed
set -- as method 'isRedirectable' doesn't fit my needs.

But when reviewing the code from DefaultRedirectStrategy.getLocation[1]
I've realized that each time is called, it will store the URI in the
current request context.
Is this correct? Should not this be done on the caller method 'getRedirect'
instead? As 'getLocation' seems more calculating, than doing the
redirection itself.

    [1]:
https://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/client/DefaultRedirectStrategy.html#122

--
Lucas

Reply via email to