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

HttpCondiut is not detecting the redirect loop properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.4, 2.7.15
    • 3.1, 2.7.16, 3.0.5
    • Transports
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: