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:38:12 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 3b2d97baa -> 20b341bd2


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

Branch: refs/heads/2.7.x-fixes
Commit: 20b341bd27bdb6bd26289dcfb469fbbf669d3ea2
Parents: 3b2d97b
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:37: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/20b341bd/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 74a738b..00c2c36 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
@@ -1822,11 +1822,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