initial cache request gets all headers removed
----------------------------------------------

                 Key: MAGNOLIA-2215
                 URL: http://jira.magnolia.info/browse/MAGNOLIA-2215
             Project: Magnolia
          Issue Type: Bug
          Components: cache
    Affects Versions: 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4
         Environment: Magnlia 3.5.8, Tomcat 6.0.16, Java 1.6.0_04-b12
            Reporter: Philippe Marschall
            Assignee: Boris Kraft
            Priority: Blocker


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_
{code}
    public void resetBuffer() {
        super.reset(); // BUG
        if (cachingStream != null) {
            cachingStream.reset();
        }
        cachingWriter = null;
        status = SC_OK;
    }
{code}
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.
{code}
    public void resetBuffer() {
        super.resetBuffer(); //FIXED
        if (cachingStream != null) {
            cachingStream.reset();
        }
        cachingWriter = null;
        status = SC_OK;
    }
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to