cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1069492 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Thu, 10 Feb 2011 17:37:13 GMT
Author: sergeyb
Date: Thu Feb 10 17:37:13 2011
New Revision: 1069492

URL: http://svn.apache.org/viewvc?rev=1069492&view=rev
Log:
[CXF-3112] Converting Expires to upper case

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java?rev=1069492&r1=1069491&r2=1069492&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
Thu Feb 10 17:37:13 2011
@@ -345,7 +345,7 @@ public class AbstractClient implements C
                 }
                 for (String val : entry.getValue()) {
                     boolean splitPossible = !(HttpHeaders.SET_COOKIE.equalsIgnoreCase(entry.getKey())
-                        && val.contains(HttpHeaders.EXPIRES));
+                        && val.toUpperCase().contains(HttpHeaders.EXPIRES.toUpperCase()));
                     String[] values = splitPossible ? val.split(",") : new String[]{val};
                     for (String s : values) {
                         String theValue = s.trim();

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java?rev=1069492&r1=1069491&r2=1069492&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java Thu
Feb 10 17:37:13 2011
@@ -147,10 +147,12 @@ public class BookStore {
     
 
     @GET
-    @Path("settwocookies")
+    @Path("setmanycookies")
     public Response setTwoCookies() {
         return Response.ok().header("Set-Cookie", "JSESSIONID=0475F7F30A26E5B0C15D69; Path=/")
-            .header("Set-Cookie", "COOKIETWO=dummy; Expires=Sat, 20-Nov-2010 19:11:32 GMT;
Path=/").build();
+            .header("Set-Cookie", "COOKIETWO=dummy; Expires=Sat, 20-Nov-2010 19:11:32 GMT;
Path=/")
+            .header("Set-Cookie", "COOKIETWO=dummy2; expires=Sat, 20-Nov-2010 19:11:32 GMT;
Path=/")
+            .build();
     }
     
     @GET

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java?rev=1069492&r1=1069491&r2=1069492&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
Thu Feb 10 17:37:13 2011
@@ -152,13 +152,13 @@ public class JAXRSClientServerBookTest e
     }
     
     @Test
-    public void testSetTwoCookieWebClient() throws Exception {
-        WebClient client = WebClient.create("http://localhost:" + PORT + "/bookstore/settwocookies");
+    public void testSetManyCookiesWebClient() throws Exception {
+        WebClient client = WebClient.create("http://localhost:" + PORT + "/bookstore/setmanycookies");
         Response r = client.type("*/*").get();
         assertEquals(200, r.getStatus());
         List<Object> cookies = r.getMetadata().get("Set-Cookie");
         assertNotNull(cookies);
-        assertEquals(2, cookies.size());
+        assertEquals(3, cookies.size());
     }
 
     



Mime
View raw message