You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrew Hoffman <an...@interdimensions.com> on 2003/10/15 16:01:02 UTC

2.0.4 and 304 Not Modified

Hi,

I'm in the process of upgrading a couple of sites running from Cocoon 
2.0.2 to 2.0.4 on various installs of Apache Tomcat, including 4.1.24 
and 4.1.26. For some reason, Cocoon 2.0.4 won't pass back a '304 Not 
Modified' when I request a file that has already been loaded and has 
clearly been cached by Cocoon. (this is what 2.0.2 and, in general, what 
most web servers do when an unmodified file is requested a second time) 
Instead, Cocoon 2.0.4 seems to consistently send back HTTP 200's and 
with all of the content again and again.

This is especially an issue with images, etc. that I am loading through 
a ResourceReader, because now the site is wasting plenty of bandwidth 
re-sending image files, and page loads have slowed considerably. I am 
using an identical sitemap.xmap file, and have tried many different 
cocoon.xconf configurations. I am not using the 'expires' parameter with 
the reader. Has anyone else experienced this problem and know of a fix?

Thanks,
Andrew

Using Mozilla and LiveHTTPHeaders, you can see the discrepancy in the 
responses when I load a GIF served up by a ResourceReader:

===============================
Cocoon 2.0.2 Response
===============================

GET /cocoontest202/Images/arr.gif HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1 

Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Wed, 24 Sep 2003 18:16:08 GMT
Cache-Control: max-age=0
 
HTTP/1.x 304 Not Modified
X-Cocoon-Version: 2.0.2
Last-Modified: Wed, 24 Sep 2003 18:16:08 GMT
Date: Wed, 15 Oct 2003 13:55:10 GMT
Server: Apache Coyote/1.0

===============================
Cocoon 2.0.4 Response
===============================

GET /cocoontest/Images/arr.gif HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1 

Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: max-age=0
 
HTTP/1.x 200 OK
X-Cocoon-Version: 2.0.4
Content-Type: image/gif
Content-Length: 48
Date: Wed, 15 Oct 2003 13:53:47 GMT
Server: Apache Coyote/1.0



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org