cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [cxf] 02/02: Adding IF_MODIFIED_SINCE header
Date Wed, 12 Dec 2018 21:05:19 GMT
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 400e9e3755a31c8de7a22fcf7b9fcb4e1a4e70ed
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Wed Dec 12 18:25:56 2018 +0000

    Adding IF_MODIFIED_SINCE header
    
    (cherry picked from commit 742d66e57896e40c0c079fa659b30b2d59e233c0)
---
 .../apache/cxf/jaxrs/client/cache/CacheControlClientRequestFilter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientRequestFilter.java
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientRequestFilter.java
index 0d4c625..b20ed31 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientRequestFilter.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientRequestFilter.java
@@ -68,11 +68,12 @@ public class CacheControlClientRequestFilter implements ClientRequestFilter
{
             if (entry.isOutDated()) {
                 String ifNoneMatchHeader = entry.getCacheHeaders().get(HttpHeaders.IF_NONE_MATCH);
                 String ifModifiedSinceHeader = entry.getCacheHeaders().get(HttpHeaders.IF_MODIFIED_SINCE);
-                
+
                 if (StringUtils.isEmpty(ifNoneMatchHeader) && StringUtils.isEmpty(ifModifiedSinceHeader))
{
                     cache.remove(key, entry);
                 } else {
                     request.getHeaders().add(HttpHeaders.IF_NONE_MATCH, ifNoneMatchHeader);
+                    request.getHeaders().add(HttpHeaders.IF_MODIFIED_SINCE, ifModifiedSinceHeader);
                     request.setProperty(CACHED_ENTITY_PROPERTY, entry.getData());
                 }
             } else {


Mime
View raw message