You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2015/04/20 17:35:28 UTC

cxf git commit: [CXF-6361] Fixing a redirection count bug

Repository: cxf
Updated Branches:
  refs/heads/master ad922b475 -> f49b63e54


[CXF-6361] Fixing a redirection count bug


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f49b63e5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f49b63e5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f49b63e5

Branch: refs/heads/master
Commit: f49b63e54fa2fcf446af755b279791c08876d963
Parents: ad922b4
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Mon Apr 20 16:35:12 2015 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Mon Apr 20 16:35:12 2015 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/transport/http/HTTPConduit.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f49b63e5/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
index a6ebaa7..92b1e44 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
@@ -1848,11 +1848,11 @@ public abstract class HTTPConduit
             // See if we are being redirected in a loop as best we can,
             // using string equality on URL.
             boolean invalidLoopDetected = newURL.equals(lastURL); 
-            if (!invalidLoopDetected) {
+            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 (maxSameURICount != null && newURLCount <= maxSameURICount) {
+                    invalidLoopDetected = false;
                 }
             }
             if (invalidLoopDetected) {