You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nick Kew <ni...@webthing.com> on 2006/07/23 20:47:34 UTC

Re: svn commit: r424759 - /httpd/httpd/trunk/modules/filters/mod_deflate.c

On Sunday 23 July 2006 16:50, rpluem@apache.org wrote:
> Author: rpluem
> Date: Sun Jul 23 08:50:08 2006
> New Revision: 424759
>
> URL: http://svn.apache.org/viewvc?rev=424759&view=rev
> Log:
> * This shortcut is too short. It is not up to the filters to decide
>   whether filters down the chain can do something useful with this empty
>   brigade.

Erm, why?  Brigades have no significance *per se*, and filters are always
free to create, delete or otherwise manipulate them within certain basic
rules.  Where's the problem with dropping an empty brigade?

>      /* Do nothing if asked to filter nothing. */
>      if (APR_BRIGADE_EMPTY(bb)) {
> -        return APR_SUCCESS;
> +        return ap_pass_brigade(f->next, bb);

-- 
Nick Kew

Re: svn commit: r424759 - /httpd/httpd/trunk/modules/filters/mod_deflate.c

Posted by Ruediger Pluem <rp...@apache.org>.

On 07/23/2006 08:47 PM, Nick Kew wrote:
> On Sunday 23 July 2006 16:50, rpluem@apache.org wrote:
> 
>>Author: rpluem
>>Date: Sun Jul 23 08:50:08 2006
>>New Revision: 424759
>>
>>URL: http://svn.apache.org/viewvc?rev=424759&view=rev
>>Log:
>>* This shortcut is too short. It is not up to the filters to decide
>>  whether filters down the chain can do something useful with this empty
>>  brigade.
> 
> 
> Erm, why?  Brigades have no significance *per se*, and filters are always
> free to create, delete or otherwise manipulate them within certain basic
> rules.  Where's the problem with dropping an empty brigade?

Just out of curiosity: Do we have these basic rules somewhere?
The problem with dropping the empty brigade is that the filter assumes that because
the brigade is not useful for it, it is not useful for anyone. That is different
from manipulating a brigade in a certain way to reach the goal the filter was
designed for. The basic rule for filters that I take from the code is:

If I cannot do anything useful with this brigade for whatever reason simply pass it down
the chain and return whatever returns.

To be more precise this was one of the
causes for PR40090 (http://issues.apache.org/bugzilla/show_bug.cgi?id=40090).
Although I proposed a different fix for this PR, because I think that mod_cache
misbehaves in this case, I think that mod_deflate also misbehaves here.

Regards

RĂ¼diger