httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Edmundsson <>
Subject Re: mod_cache: save filter recalls body to non-empty brigade?
Date Wed, 24 Jan 2007 15:46:54 GMT
On Wed, 24 Jan 2007, Graham Leggett wrote:

> On Wed, January 24, 2007 2:15 pm, Niklas Edmundsson wrote:
>> In mod_cache, recall_body() is called in the cache_save_filter() when
>> revalidating an entity.
>> However, if I have understood things correctly the brigade is already
>> populated when the save filter is called, so calling recall_body() in
>> this case would place additional stuff in the bucket brigade.
>> Wouldn't it be more correct to empty the brigade before calling
>> recall_body()? Or am I missing something?
> I think the theory is that recall_body() should only be called on a 304
> not modified (with no body), so in theory there is no existing body
> present, so no need to clear the brigade.

Ah. Then it makes sense. I only saw that it checked if status == OK, 
but I see now that I was looking at the wrong status value ;)

> Of course practically you don't want to make assumptions about the
> emptiness of the existing brigade, so clearing the brigade as a first step
> makes definite sense.

OK. Do you want a patch for it, or will you fix it yourself? The 
cache-situation on trunk isn't completely clear, so maybe those 
patches that should be revoked from there should be cleaned up 

  Niklas Edmundsson, Admin @ {acc,hpc2n}      |
  Reality--what a concept!

View raw message