From 84bf389af59e95353a5c4c631decc0c3ea5129ae Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 15 Jan 2012 09:40:42 +0100 Subject: [PATCH] =?utf8?q?Doppelte=20Dekoration=20bei=20Verwendung=20von?= =?utf8?q?=20Filter=20und=20Interceptor=20unterdr=C3=BCckt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../juplo/cachecontrol/CacheControlInterceptor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControlInterceptor.java b/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControlInterceptor.java index 254187f7..77d0a862 100644 --- a/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControlInterceptor.java +++ b/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/CacheControlInterceptor.java @@ -57,7 +57,12 @@ public class CacheControlInterceptor implements HandlerInterceptor { ModelAndView modelAndView ) throws Exception { - cacheControl.decorate(request, response, handler); + /** + * Dekoration nur dann anstossen, wenn sie nicht bereits von dem + * AcceleratorFilter ausgelöst wird. + */ + if (request.getAttribute(AcceleratorFilter.RESPONSE_WRAPPER) == null) + cacheControl.decorate(request, response, handler); } @Override -- 2.20.1