cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r921223 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java
Date Wed, 10 Mar 2010 03:59:24 GMT
Author: dkulp
Date: Wed Mar 10 03:59:23 2010
New Revision: 921223

URL: http://svn.apache.org/viewvc?rev=921223&view=rev
Log:
[CXF-2702]Fix issue with auth provider and non-cxf usage
Patch from S. Ali Tokmen applied

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java?rev=921223&r1=921222&r2=921223&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java
Wed Mar 10 03:59:23 2010
@@ -79,8 +79,11 @@ public class CXFAuthenticator extends Au
                 //ignore
             }
         }
-        if (auth == null) {
-            Message m = PhaseInterceptorChain.getCurrentMessage();
+        if (auth != null) {
+            return auth;
+        }
+        Message m = PhaseInterceptorChain.getCurrentMessage();
+        if (m != null) {
             Exchange exchange = m.getExchange();
             Conduit conduit = exchange.getConduit(m);
             if (conduit instanceof HTTPConduit) {
@@ -102,6 +105,8 @@ public class CXFAuthenticator extends Au
                 }
             }
         }
+        // else PhaseInterceptorChain.getCurrentMessage() is null,
+        // this HTTP call has therefore not been generated by CXF
         return auth;
     }
 }



Mime
View raw message