cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <gian...@apache.org>
Subject Re: Last-Modified and If-Modified-Since on pipelines
Date Sat, 03 May 2003 16:58:57 GMT
Miles Elam wrote:
> I ran a cvs update just before making the patch file.  Color me 
> confused...   Anyway, I've attached an updated patch, repulled the file, 
> and successfully applied the patch.  If it doesn't work, I expect 
> someone to shove me into a corner and dump a duncehat on my head.

Patch applies cleanly now, thanks.

Problem is I'm not getting the behaviour I expect. After applying your 
patch, I fire up the Cocoon servlet and point my browser to 
http://localhost:8888/samples/hello-world/hello.html, a caching pipeline 
that should have no problem in caching the result and storing the 
lastModified timestamp. On my first attempt I get:

===================================================================
http://localhost:8888/samples/hello-world/hello.html

GET /samples/hello-world/hello.html HTTP/1.1
Host: localhost:8888
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate,compress;q=0.9
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 200 OK
Date: Sat, 03 May 2003 16:51:26 GMT
Server: Jetty/4.2.8 (Linux/2.4.19-4GB i386 java/1.4.1_01)
X-Cocoon-Version: 2.1-M2-dev
Content-Type: text/html
Last-Modified: Sat, 03 May 2003 16:43:35 GMT
Content-Length: 349
===================================================================

So far, so good. Now I hit return again on the location bar (no reload, 
since this would set a Cache-Control: max-age=0 to the server, forcing 
it to ignore caching - even if I don't actually think that Cocoon is 
able to recognize that, but anyway...), and this is what I get:

===================================================================
http://localhost:8888/samples/hello-world/hello.html

GET /samples/hello-world/hello.html HTTP/1.1
Host: localhost:8888
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate,compress;q=0.9
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Sat, 03 May 2003 16:43:35 GMT

HTTP/1.x 200 OK
Date: Sat, 03 May 2003 16:53:40 GMT
Server: Jetty/4.2.8 (Linux/2.4.19-4GB i386 java/1.4.1_01)
X-Cocoon-Version: 2.1-M2-dev
Content-Type: text/html
Last-Modified: Sat, 03 May 2003 16:43:35 GMT
Content-Length: 349
====================================================================

As you can see, the If-Modified-Since header is there on the request, 
and I would expect a 304 as a response, but I'm getting a 200 instead 
(on the reader's output for the css, I get my 304 as expected).

Am I doing something wrong? How can I help you debug this one?

Ciao,

-- 
Gianugo Rabellino
Pro-netics s.r.l.
http://www.pro-netics.com


Mime
View raw message