On Mon, 21 Jan 2002, Justin Erenkrantz wrote: > On Sun, Jan 20, 2002 at 10:36:47PM -0500, Cliff Woolley wrote: > > > > Can someone please remind me why APR_BRIGADE_NORMALIZE is absolutely > > necessary? It's only being used in one place AFAICT (in core.c), and as > > far as I know, that just means there's a bug we're patching around rather > > than fixing. I was grudgingly okay with it until today, when it occurred > > to me that removing all zero-length buckets would nuke any third-party > > metadata buckets that might be in the brigade, meaning that it's a really > > bad idea.
The reason for normalize was to make the code easier to read and understand. Every filter must be able to deal with 0 length buckets, because nobody knows everytime that they will be inserted. Remember that just because we have written a core_input_filter, that doesn't mean it will always be used, it is easy enough for anybody to replace it. The easiest way to deal with 0 length buckets is to remove them from the brigade. However, you are correct that there are a lot of problems with just removing them, so we should fix the code instead of hacking around it. Ryan
