Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6361

HttpCondiut is not detecting the redirect loop properly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.4, 2.7.15
    • Fix Version/s: 3.1, 2.7.16, 3.0.5
    • Component/s: Transports
    • Labels:
    • Estimated Complexity:
      Unknown

      Description

      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:

      HTTPConduit.java
                  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;
                      }
                  }
      

      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

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              azzarbad79 Thorben Witt
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: