[ 
https://issues.apache.org/jira/browse/COCOON-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474868
 ] 

Daniel Fagerstrom commented on COCOON-2009:
-------------------------------------------

In a comment in the patch you say: IMPORTANT: It *has* to be called *after* 
caching because date in Last-Modified header must be later than time stored in 
cache to get it properly working.

Looking at HttpEnvironment.isResponseModified, I would rather say: later or at 
the _same time_ as the time stored in cache. And based on that I would use
  environment.isResponseModified(this.cachedResponse.getLastModified());
instead of 
  environment.isResponseModified(new Date().getTime());

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 could happen that this would confuse the browser. Probably it doesn't matter 
at all, but as caching is notouriosly hard to test, and rather subtle, I would 
like to understand your reasoning exactly.

> 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.

Reply via email to