cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1005532 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Thu, 07 Oct 2010 17:21:26 GMT
Author: dkulp
Date: Thu Oct  7 17:21:26 2010
New Revision: 1005532

URL: http://svn.apache.org/viewvc?rev=1005532&view=rev
Log:
Use an insensitive compare to find cookies as some web servers
are returning the all strange.

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

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1005532&r1=1005531&r2=1005532&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Thu Oct  7 17:21:26 2010
@@ -2180,8 +2180,11 @@ public class HTTPConduit 
             inMessage.put(Message.ENCODING, normalizedEncoding);            
                         
             if (maintainSession) {
-                List<String> cookies = connection.getHeaderFields().get("Set-Cookie");
-                Cookie.handleSetCookie(sessionCookies, cookies);
+                for (Map.Entry<String, List<String>> h : connection.getHeaderFields().entrySet())
{
+                    if ("Set-Cookie".equalsIgnoreCase(h.getKey())) {
+                        Cookie.handleSetCookie(sessionCookies, h.getValue());
+                    }
+                }
             }
             if (responseCode != HttpURLConnection.HTTP_NOT_FOUND) {
                 in = in == null



Mime
View raw message