> -----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