httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sami Tikka" <sami.ti...@f-secure.com>
Subject Re: what response code filters should return when they see c->aborted?
Date Mon, 29 Dec 2003 20:46:50 GMT
On Thu, Dec 11, 2003 at 10:38:06AM -0800, Stas Bekman wrote:
> What's confusing is that it seems that most consumers (not filters) (e.g. in
> protocol.c) that call ap_pass_brigade are completely ignoring its response 
> code.

It seems to me that many output filters are also ignoring
ap_pass_brigade return code. Also, the few sample filters I've seen do
that all the time.

Lately I have been searching for a memory leak in my output filter and
was wondering if it is safe to "return ap_pass_brigade(f->next, bb)" if
my filter is holding on to some buckets in a private brigade which is
hanging in f->ctx.

Should a filter always check ap_pass_brigade return code and when it
sees an error, cleanup its own mess before returning?

Or does it matter? If the brigade was created with
"apr_brigade_create(f->r->pool, f->c->bucket_alloc)", does it mean the
brigade is cleaned up when the request pool is destroyed? And all the
buckets in the brigade are returned to the allocator?

-- 
  Sami Tikka                          tel: +358 9 2520 5115
  Senior Software Engineer            fax: +358 9 2520 5013
  F-Secure Corporation                http://www.F-Secure.com/
  F-Secure: Securing the Mobile, Distributed Enterprise

Mime
View raw message