httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <mar...@apache.org>
Subject Re: Small patch to mod_disk_cache...
Date Wed, 04 Feb 2004 18:47:24 GMT
On Sun, Feb 01, 2004 at 01:30:56AM +0000, Pier Fumagalli wrote:
> I found a small bug in mod_disk_cache...
> 
> CacheMinFileSize and CacheMaxFileSize process the argument with atoi(), 
> which simply means that they'll get -1 if the value is quite large (I 
> need to cache some big files)...
> 
> At the same time, I added a small feature I needed: the ability to 
> cache content from sources where content-length is not specified 
> (namely, friggin' JSPs).

Strange that you found that at the same time as I did. Your patch is
missing the following:

* it must check CacheMinFileSize and CacheMaxFileSize when the
  response is complete. That may mean that we are checking at two places:
  -> when the C-L is known, we check before we cache
  -> when it is unknown we check "on-the-way" for CacheMaxFileSize, and
     after caching completion for CacheMinFileSize

* it *may* compare the actual size of the cached copy against the C-L
  header, and discard it if the two don't match

Also, in spite of RFC2616 14.8, we currently *never* cache
authenticated responses, even if the RFC would allow for it.
The auth check can be taken out of mod_cache,
the check in mod_disk_cache replaces it (but I have not checked
whether mod_mem_cache checks auth as well -- it should, or mod_cache
should try and analyze the headers_out as well).

The patch (completely independent from yours) tries to address that.
IMO the two should be merged (I am on my way home, so I'm not doing
the merge right now). 

   Martin
-- 
<Martin.Kraemer@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Mime
View raw message