cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1363431 - in /cxf/trunk: rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/
Date Thu, 19 Jul 2012 17:22:40 GMT
Author: sergeyb
Date: Thu Jul 19 17:22:39 2012
New Revision: 1363431

URL: http://svn.apache.org/viewvc?rev=1363431&view=rev
Log:
[CXF-4433] Fixing the typo losing the correct 'allowCredentials' response value

Modified:
    cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/UnannotatedCorsServer.java

Modified: cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java?rev=1363431&r1=1363430&r2=1363431&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
(original)
+++ cxf/trunk/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
Thu Jul 19 17:22:39 2012
@@ -322,7 +322,7 @@ public class CrossOriginResourceSharingF
         rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_ORIGIN, 
                         m.getExchange().get(CorsHeaderConstants.HEADER_ORIGIN));
         rbuilder.header(CorsHeaderConstants.HEADER_AC_ALLOW_CREDENTIALS,
-                        Boolean.toString(allowCredentials));
+                        m.getExchange().get(CorsHeaderConstants.HEADER_AC_ALLOW_CREDENTIALS));
         
         if (SIMPLE_REQUEST.equals(op)) {
             /* 5.1.4 expose headers */

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java?rev=1363431&r1=1363430&r2=1363431&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/CrossOriginSimpleTest.java
Thu Jul 19 17:22:39 2012
@@ -319,7 +319,7 @@ public class CrossOriginSimpleTest exten
         HttpResponse response = httpclient.execute(http);
         assertEquals(200, response.getStatusLine().getStatusCode());
         assertOriginResponse(false, new String[]{"http://area51.mil:31415"}, true, response);
-        assertAllowCredentials(response, false);
+        assertAllowCredentials(response, true);
         List<String> exposeHeadersValues 
             = headerValues(response.getHeaders(CorsHeaderConstants.HEADER_AC_EXPOSE_HEADERS));
         // preflight never returns Expose-Headers

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/UnannotatedCorsServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/UnannotatedCorsServer.java?rev=1363431&r1=1363430&r2=1363431&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/UnannotatedCorsServer.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/cors/UnannotatedCorsServer.java
Thu Jul 19 17:22:39 2012
@@ -51,7 +51,6 @@ public class UnannotatedCorsServer {
     @GET
     @CrossOriginResourceSharing(allowOrigins = {
             "http://area51.mil:31415" }, 
-             allowCredentials = true, 
              exposeHeaders = {"X-custom-3", "X-custom-4" })
     @Produces("text/plain")
     @Path("/annotatedGet/{echo}")



Mime
View raw message