httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject registering filters on a stack.
Date Mon, 10 Jul 2000 02:55:21 GMT

I implemented this, but not fully.  I am noticing that registering filters
onto a stack is harder for the module writer than registering to either a
linked list or the hooks.

The linked-list/hooks implementation allows Apache to keep track of which
filters are being used.  This does mean that some filters will be called
after they are done.  For example, a module that just inserts a header to
a page will be called multiple times, when it could be called just
once.  (This is a solve-able problem, by adding remove functions for

The stack requires that anytime a filter is called, the filter must put
itself back onto the stack.  That seems like an unnecessary step.  

Most filters will want to be called for all of the data, it will be the
minority that just wants to see the first block.  Stacks require that
filters always re-insert themselves, unless they are done.

Hooks/list requires the filters to take themselves out if they are done.

Having said that, it is easy to implement the saved data stuff.  I missed
it when I was writing the code, but I'll add it early tomorrow morning.

I implemented the stack filters in under an hour, and that was with the
bit of debugging required to make everything work.  This proves to me that
it is easy to change how filters are registered without affecting the rest
of the patch.

I would like to commit some form of filtering later this week.  At this
point, we have two basic patches out there.  Can we decide on a
scheme?  If we choose the bucket_brigades, then we just need to choose a
registration method.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message