[
https://issues.apache.org/jira/browse/CXF-6361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14505182#comment-14505182
]
Sergey Beryozkin commented on CXF-6361:
---------------------------------------
AFAIK 'maxRetransmits' controls a total number of redirects or authorization
based retransmits.
AUTO_REDIRECT_MAX_SAME_URI_COUNT controls how many times the same URI can be
found a multi-step redirect process provided that a given URI is not repeated
twice (or more) in a row.
So by default, a-b-a fails because 'a' is seen twice but
AUTO_REDIRECT_MAX_SAME_URI_COUNT can be set to 2 and it will work, but say
a-b-a-c-a - won't.
There's no way to support a redirect like a-a or a-a-a at the moment.
I guess you are right, AUTO_REDIRECT_MAX_SAME_URI_COUNT can be used to allow a
sequence like 'a-a' too...
> HttpCondiut is not detecting the redirect loop properly
> -------------------------------------------------------
>
> Key: CXF-6361
> URL: https://issues.apache.org/jira/browse/CXF-6361
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 3.0.4, 2.7.15
> Reporter: Thorben Witt
> Assignee: Sergey Beryozkin
> Labels: easyfix
> Fix For: 3.1.0, 2.7.16, 3.0.5
>
>
> Hi all,
> in the class HTTPConduit is the detection of a redirect. I guess there is a
> slightly problem with the detection, when the URLs are the same:
> Line 1824:
> {code:title=HTTPConduit.java|borderStyle=solid}
> boolean invalidLoopDetected = newURL.equals(lastURL);
> if (!invalidLoopDetected) {
> // this URI was used sometime earlier
> Integer maxSameURICount = PropertyUtils.getInteger(message,
> AUTO_REDIRECT_MAX_SAME_URI_COUNT);
> if (maxSameURICount == null || newURLCount > maxSameURICount)
> {
> invalidLoopDetected = true;
> }
> }
> {code}
> If the URLs are the same (boolean is true), then the if part is not reached
> and the property AUTO_REDIRECT_MAX_SAME_URI_COUNT cannot be used.
> Can you change that? I think the change is just the removal of the not-sign:
> if (invalidLoopDetected) {...}
> Best regards,
> Thorben
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)