From: Kai Moritz Date: Sun, 25 Dec 2011 11:49:03 +0000 (+0100) Subject: Schweren BUG in AccelarationFilter korrigiert X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=7b440f7f3568028e63280646cfb071652bd81e94;p=percentcodec Schweren BUG in AccelarationFilter korrigiert Der Dekorator wurde gar nicht mit dem Handler aufgerufen! --- diff --git a/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/AcceleratorFilter.java b/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/AcceleratorFilter.java index 992d9dc9..7c250a24 100644 --- a/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/AcceleratorFilter.java +++ b/cachecontrol/src/main/java/de/halbekunst/juplo/cachecontrol/AcceleratorFilter.java @@ -569,7 +569,7 @@ public class AcceleratorFilter implements Filter { @Override public void close() throws IOException { try { - AcceleratorFilter.this.cacheControl.decorate(AccelerationWrapper.this.request, response, buffer); + AcceleratorFilter.this.cacheControl.decorate(AccelerationWrapper.this.request, response, AccelerationWrapper.this); } catch (Exception e) { log.error("Error while guessing Cache-Header's", e); @@ -584,7 +584,7 @@ public class AcceleratorFilter implements Filter { @Override public void flush() throws IOException { try { - AcceleratorFilter.this.cacheControl.decorate(AccelerationWrapper.this.request, response, buffer); + AcceleratorFilter.this.cacheControl.decorate(AccelerationWrapper.this.request, response, AccelerationWrapper.this); } catch (Exception e) { log.error("Error while guessing Cache-Header's", e); diff --git a/cachecontrol/src/test/java/de/halbekunst/juplo/cachecontrol/HttpTestCase.java b/cachecontrol/src/test/java/de/halbekunst/juplo/cachecontrol/HttpTestCase.java index 6fe096ea..bd28c91b 100644 --- a/cachecontrol/src/test/java/de/halbekunst/juplo/cachecontrol/HttpTestCase.java +++ b/cachecontrol/src/test/java/de/halbekunst/juplo/cachecontrol/HttpTestCase.java @@ -7,8 +7,6 @@ import com.meterware.servletunit.ServletUnitClient; import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; -import java.util.HashMap; -import java.util.Map; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;