cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6361] Fixing a redirection count bug
Date Mon, 20 Apr 2015 15:37:12 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes d657398ab -> 4da6c1592


[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/4da6c159
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4da6c159
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4da6c159

Branch: refs/heads/3.0.x-fixes
Commit: 4da6c15923f5eb9029a1f7a8831151d565be1531
Parents: d657398
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Mon Apr 20 16:35:12 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Mon Apr 20 16:36:54 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/4da6c159/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 304f644..10ed509 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
@@ -1851,11 +1851,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) {


Mime
View raw message