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:35:28 GMT
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 <sberyozkin@talend.com>
Authored: Mon Apr 20 16:35:12 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@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) {


Mime
View raw message