cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1173381 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java
Date Tue, 20 Sep 2011 21:19:51 GMT
Author: dkulp
Date: Tue Sep 20 21:19:51 2011
New Revision: 1173381

URL: http://svn.apache.org/viewvc?rev=1173381&view=rev
Log:
Treat the session maintain as a contextual property to allow configuring
it in via spring/blueprint config

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

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java?rev=1173381&r1=1173380&r2=1173381&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java
Tue Sep 20 21:19:51 2011
@@ -24,6 +24,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageUtils;
 
 public class Cookies {
     /**
@@ -48,8 +49,8 @@ public class Cookies {
     
     public void writeToMessageHeaders(Message message) {
         //Do we need to maintain a session?
-        maintainSession = Boolean.TRUE.equals((Boolean)message.get(Message.MAINTAIN_SESSION));
-
+        maintainSession = MessageUtils.getContextualBoolean(message, Message.MAINTAIN_SESSION,
false);
+        
         //If we have any cookies and we are maintaining sessions, then use them        
         if (maintainSession && sessionCookies.size() > 0) {
             new Headers(message).writeSessionCookies(sessionCookies);



Mime
View raw message