httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Issac Goldstand <>
Subject Re: mod_offline
Date Tue, 24 Oct 2006 09:02:33 GMT

Graham Leggett wrote:
> Issac Goldstand wrote:
>>> - Cache-Control and Pragma headers must be stripped from requests into
>>> the cache.
>> Why?  Just because you are in offline mode doesn't mean other proxies
>> between you and the client (or the client itself) are.
> Other proxies don't matter in this case - the end goal is to protect 
> the origin server from being hit unnecessarily by the cache, in 
> response to headers added by some client.
> If strict RFC compliant behaviour was in effect, a Cache-Control: 
> no-cache from a client would invalidate a cached URL, forcing a 
> conditional refresh from the origin server, which may either be 
> missing or broken. The result is that a cached URL gets replaced by a 
> page with a 5xx error in it.
As Brian correctly noticed, I misread you initial comment - I thought 
you meant stripping the upstream headers, not downstream.  In my 
implementation (see below) we just waste a bit more diskspace to deal 
with this by requiring an exact header match, rather than URL match, to 
deal with this.  It's not final, but it's what we had time to initially do.
>> I think I can get permission to send a patch of what we did so far, if
>> there's interest; it's crude and still not fully tested (and we haven't
>> merged in the recent mod_disk_cache changes), but it's simple and may be
>> a helpful starting point.
> Let's take a look.
Enclosed.  Currently, I've attached it as a "massive" patch to revision 
443423 (just before the massive changes to mod_disk_cache, which I 
haven't found time to review and merge yet), which contains the offline 
code, code to select a specific cache entry by ID using a special 
request header, and some other minor changes which don't affect 
functionality overall (whitespace, debug logging, etc).  We plan on 
eventually making it better (and prettier); frankly I never expected to 
see any interest in offline functionality being bundled with the 
standard mod_cache, so aimed for quick'n'dirty rather than robust.  If 
there's interest in using bits of this, I'd be happy to clean it up, 
merge it with trunk and break up the patch into multiple functionality 
changes-based patches.


View raw message