[ https://issues.apache.org/jira/browse/COCOON-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475013 ]
Grzegorz Kossakowski commented on COCOON-2009: ---------------------------------------------- Thanks for spotting this. Your concerns are justified and I agree that we should use getLastModified of the response stored in cache. The problem is that cachedResponse variable will be null at this point of processing. Why? Because it's used only for _serving_ cached response. When you look into dark details of the AbstractCachingProcessingPipeline you'll see that cachedResponse variable is set during validation of pipeline. That means, if cachedResponse is still valid the variable is set. Solution for this situation that would not confuse things even more is returning cachedResponse as result of cacheResults. I've chosen much simpler (and it's seems invalid) way as I really don't like changing sitemap/pipeline code. To stay reserved and courteous I will only say that the code is messy and inconsistent... I also have not been aware of this: Because otherwise it might happen that Last-Modified == new Date().getTime() (>this.cachedResponse.getLastModified()) the first time the pipeline is called and that the next and future times the pipeline is called it will (due to line 279 in AbstractCachingProcessingPipeline.processXMLPipeline) have Last-Modified==this.cachedResponse.getLastModified(). It's really good point. > Pipelines more HTTP-compliant (respecting and producing HTTP headers and > status codes) > -------------------------------------------------------------------------------------- > > Key: COCOON-2009 > URL: https://issues.apache.org/jira/browse/COCOON-2009 > Project: Cocoon > Issue Type: Improvement > Components: - Components: Sitemap > Affects Versions: 2.2-dev (Current SVN) > Reporter: Grzegorz Kossakowski > Fix For: 2.2-dev (Current SVN) > > Attachments: cocoon-pipeline-impl-http-compliant-patch-1.txt > > > This issue was discussed a little here: > http://news.gmane.org/find-root.php?group=gmane.text.xml.cocoon.devel&article=70383 > Main aim is to respect cache-related headers and produce necessary > information for clients to do proper caching. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.