httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jones" <oscare...@gmail.com>
Subject Clarification on mod_cache request with max-age expired, 200 or 304?
Date Fri, 22 Sep 2006 18:35:12 GMT
What is the proper status for a mod_cache request with both
If-Modified-Since and
Cache-Control: max-age=n, when max-age indicates expiration?

Ex. Send a request with large max-age, receive an expected 304.
Wait 5 seconds
Send another request with If-Modified-Since and max-age=1 (delta seconds >
max-age)
Still receive a 304.

I was expecting a 200 since max-age < delta,
what is supposed to happen?

Ran this at 2.2.3 with mod_mem_cache.


error_log:

[Fri Sep 22 10:32:34 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE
filter for /cache1.html
[Fri Sep 22 10:32:34 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL
filter for /cache1.html
[Fri Sep 22 10:32:34 2006] [debug] mod_cache.c(502): cache: /cache1.html not
cached. Reason: HTTP Status 304 Not Modified
[Fri Sep 22 10:32:41 2006] [debug] cache_storage.c(272): Cached response for
/cache1.html isn't fresh.  Adding/replacing conditional request headers.
[Fri Sep 22 10:32:41 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE
filter for /cache1.html
[Fri Sep 22 10:32:41 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL
filter for /cache1.html
[Fri Sep 22 10:32:41 2006] [debug] mod_cache.c(602): cache: Caching url:
/cache1.html
[Fri Sep 22 10:32:41 2006] [debug] mod_cache.c(608): cache: Removing
CACHE_REMOVE_URL filter.
[Fri Sep 22 10:32:41 2006] [debug] mod_cache.c(651): cache: Added date
header


Traces (this is from a 2.0.47 run so time stamps wont match above, but i get
same results)

================1st request/response==========================
GET /cache1.html HTTP/1.1
Cache-Control: max-age=1001
If-Modified-Since: Thu, 21 Sep 2006 18:51:46 GMT
User-Agent: Jakarta Commons-HttpClient/3.0-rc2
Host: 127.0.0.1

HTTP/1.1 304 Not Modified
Date: Thu, 21 Sep 2006 18:51:50 GMT
ETag: "9652c-13-41dfb3724d480"

================2nd request/response==========================
GET /cache1.html HTTP/1.1
Cache-Control: max-age=1
If-Modified-Since: Thu, 21 Sep 2006 18:51:46 GMT
User-Agent: Jakarta Commons-HttpClient/3.0-rc2
Host: 127.0.0.1

HTTP/1.1 304 Not Modified
Date: Thu, 21 Sep 2006 18:51:55 GMT
ETag: "9652c-13-41dfb3724d480"


David Jones

Mime
View raw message