You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Thorben Witt (JIRA)" <ji...@apache.org> on 2015/04/20 16:08:01 UTC

[jira] [Created] (CXF-6361) HttpCondiut is not detecting the redirect loop properly

Thorben Witt created CXF-6361:
---------------------------------

             Summary: 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: 2.7.15, 3.0.4
            Reporter: Thorben Witt


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)