-
Bug
-
Resolution: Fixed
-
Blocker
-
3.5.4, 3.5.5, 3.5.6, 3.5.7, 3.5.8
-
None
-
Magnlia 3.5.8, Tomcat 6.0.16, Java 1.6.0_04-b12
If a request is made to the cache filter and it's response is not yet cached then all HTTP headers set previously by servlet filters are removed from the response. For all subsequent requests the HTTP headers set by servlet filters are preserved.
We are aware that HTTP headers are not cached but this is a different issue. We explicitly set them in servlet filters for every request including cached ones.
The bug is in the following method in the class info.magnolia.cms.cache.CacheResponseWrapper
public void resetBuffer() { super.reset(); // BUG if (cachingStream != null) { cachingStream.reset(); } cachingWriter = null; status = SC_OK; }
The problem is the invocation of the wrong superclass method (reset instead of resetBuffer). This method in invoked by the jsp template renderer when it does a forward.
public void resetBuffer() { super.resetBuffer(); //FIXED if (cachingStream != null) { cachingStream.reset(); } cachingWriter = null; status = SC_OK; }
Acceptance criteria