cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1561100 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java
Date Fri, 24 Jan 2014 18:13:34 GMT
Author: sergeyb
Date: Fri Jan 24 18:13:34 2014
New Revision: 1561100

URL: http://svn.apache.org/r1561100
Log:
Merged revisions 1561097 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1561097 | sergeyb | 2014-01-24 18:10:13 +0000 (Fri, 24 Jan 2014) | 1 line
  
  [CXF-5508] Fixing Request.evaluatePreconditions(Date, EntityTag)
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1561097

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java?rev=1561100&r1=1561099&r2=1561100&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
Fri Jan 24 18:13:34 2014
@@ -290,7 +290,7 @@ public class RequestImpl implements Requ
             // the ETag conditions do not match, so last modified should be ignored
             // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html (section 14.26
for
             // "If-None-Match", behaviour not specified for "If-Match", section 14.24)
-            return null;
+            return rb;
         }
     }
     

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java?rev=1561100&r1=1561099&r2=1561100&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java
Fri Jan 24 18:13:34 2014
@@ -212,6 +212,16 @@ public class RequestImplTest extends Ass
     }
     
     @Test
+    public void testIfNotMatchAndLastModified() {
+        metadata.putSingle(HttpHeaders.IF_NONE_MATCH, "1");
+        
+        ResponseBuilder rb = 
+            new RequestImpl(m).evaluatePreconditions(new Date(), new EntityTag("1"));
+        assertEquals("Precondition must not be met", 
+                     304, rb.build().getStatus());
+    }
+    
+    @Test
     public void testEtagsIfNotMatch() {
         metadata.putSingle(HttpHeaders.IF_NONE_MATCH, "\"123\"");
         



Mime
View raw message