httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <ma...@io.com>
Subject Re: [PATCH] ap_add_filter
Date Tue, 22 Aug 2000 07:09:38 GMT
On Sun, Aug 20, 2000 at 08:05:14AM -0700, rbb@covalent.net wrote:
> > The benefits:
> > 
> > - The argument between you and Greg goes away, because a filter can be
> >   added anywhere you want. There's more freedom because the filter has
> >   it's "zone" of the dataflow staked out to do whatever it wants.
> 
> This is a BS reason for a design change.  Sorry.  Arguments between two
> programmers should never be the reason for changing a design.

The point is that this scheme allows both yours and Greg's ideas to
exist simultaneously. I think that is a valid reason.

> > - Filters no longer have to muck around with the main filter chain.  I
> >   think this is just a cleaner design. Filters only look at their own
> >   world, and the boundaries of what they can and can't do are clearly
> >   marked. Having lots of entities touching a single data structure
> >   when it can easily be avoided just seems wrong to me.
> 
> But, this same abstraction exists in a much simpler stack.  Take a look at
> the code that I have already posted.  It isn't as explicit as your design,
> but it does the same thing.  Because filters can only add more
> filters immediately after themselves, they have an implicit sub_chain, and
> cannot muck with the filter stack in general.

So, if our hypothetical PHP wants to add mod_include and then add
gzip after it, PHP can't do so without figuring out that it needs
gzip first?

> This is one of the problems.  Filters don't need to and probably won't
> understand HTTP in a general sense.  Apache needs to be the thing that
> adds filters, because it is the only thing really understands the flow of
> HTTP.  If modules are given sole responsability for adding new filters,
> then we are likely to get bad data.

I'm not saying that modules are the only things that can add filters.
They add filters to their own chains. And no, they should know nothing
about HTTP; they are just content generators.

The HTTP protocol handler adds filters like chunking or whatever to
the main chain as appropriate.

> I am allowing the
> filter to have access to the same section, but doing so implicitly, and
> not modifying any code except ap_add_filter.

Modification of code isn't really the issue, especially if the code
was written for 2.0 (within reason; this is 2.0 after all), clean code
should be.

Anyway, code is coming. No promises as to when, though. :)


Mime
View raw message