httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: [PATCH] Rework httpd buckets/filtering
Date Sun, 23 Sep 2001 18:28:19 GMT
On Sun, 23 Sep 2001, Justin Erenkrantz wrote:

> > You can't do this.  The reason for the immortal bucket, was that we
> > are closing the pipe or socket bucket.  What this change does, is it
> > closes the pipe, but leaves the bucket in the brigade.  This will
> > cause problems later. You can't just remove the bucket, because you
> > only have access to the one bucket, and if you remove this bucket,
> > then you also need to update the pointer from the previous bucket,
> > which you can't do.
> This adds all of the 0-length buckets that make some of the higher-level
> code more complicated.  Wouldn't calling apr_bucket_delete(a) work here?
> The bucket contains a link to which brigade it is in - so it should be
> able to update the right pointers, no?

No.  You can fix b->prev->next and b->next->prev, but you can't fix the
caller's copy of b.  A bucket can never be allowed to delete itself for
that very reason.  When the pipe and socket buckets become empty, the very
most efficient way to handle it is to just remove the pipe and socket
bucket completely; but with the above constraint, the only way to do that
is to replace the pipe/socket bucket with the lightest-weight bucket
possible.  That's an immortal bucket of zero length.


   Cliff Woolley
   Charlottesville, VA

View raw message