httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sami Tikka <>
Subject Re: mod_deflate update
Date Mon, 19 Apr 2004 07:39:59 GMT
su, 2004-04-18 kello 15:22, Nick Kew kirjoitti:
> Also a question: When I create a bucket brigade in a module, I always
> explicitly apr_brigade_destroy() it.  None of the filters in mod_deflate
> destroy their brigades.  A look at apr_brigade.c shows that it's not
> in fact necessary, but maybe a note to that effect would be in order?

Isn't it dangerous to apr_brigade_destroy()? As I understand,
apr_brigade_destroy frees the buckets in the brigade AND also frees the
brigade structure itself.

I used to do it with my output filter and I managed to crash Apache
right away. The reason was that mod_proxy_http keeps reusing the brigade
and doesn't take it nicely if someone goes and destroys it.

Cliff Wolley once said that you must either pass a bucket to the next
filter or destroy it but I have not heard from any authoritative source
what should be done with brigades. I just know that for my particular
case apr_brigade_destroy is a bad thing. On the other hand an output
filter should not have to know if it is processing content originated
from mod_proxy or mod_perl or any other handler, right? The interface
should always be the same.

-- Sami

View raw message