httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plüm, Rüdiger, VF EITO <ruediger.pl...@vodafone.com>
Subject Re: mod_cache: save filter recalls body to non-empty brigade?
Date Wed, 24 Jan 2007 15:54:03 GMT


> -----Ursprüngliche Nachricht-----
> Von: Graham Leggett 
> Gesendet: Mittwoch, 24. Januar 2007 16:15
> An: dev@httpd.apache.org
> Cc: dev@httpd.apache.org
> Betreff: Re: mod_cache: save filter recalls body to non-empty brigade?
> 
> 
> 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.
> 
> 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.

It is not needed to clear the brigade, because the brigade passed to the filter
is named in, the one where recall_body stores the cached file is bb. I the case
of a recalled body we pass bb down the chain not in.

Regards

Rüdiger


Mime
View raw message