cxf-commits mailing list archives

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

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 742d66e  Adding IF_MODIFIED_SINCE header
742d66e is described below

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

    Adding IF_MODIFIED_SINCE header
---
 .../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