From 19b12c2aad9306f94e3b7a27833b0fe2f27e20fc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 1 Jun 2012 18:29:14 +0200 Subject: [PATCH] "Content-Encoding: gzip" wird jetzt bei 304 nicht mehr mit ausgegeben --- .../java/de/halbekunst/juplo/cachecontrol/CacheControl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControl.java b/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControl.java index 24d27d3c..486cb33f 100644 --- a/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControl.java +++ b/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControl.java @@ -102,9 +102,6 @@ public class CacheControl { return false; } - if (handle.isZipped()) - response.addHeader(Headers.HEADER_CONTENT_ENCODING, "gzip"); - Map headers = handle.getAdditionalHeaders(request); for (String name : headers.keySet()) response.addHeader(name, headers.get(name)); @@ -224,6 +221,9 @@ public class CacheControl { log.debug("{}: first up!", url); + if (handle.isZipped()) + response.addHeader(Headers.HEADER_CONTENT_ENCODING, "gzip"); + /** HTTP/1.1-Caching-Header richtig setzen!! */ response.setDateHeader(Headers.HEADER_LAST_MODIFIED, lastModified); -- 2.20.1