httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: SSL support
Date Sun, 04 Feb 2001 21:51:04 GMT

> > > I was noticing as I went along all these filters that know stuff about
> > > the next/previous filter in the chain. I can't say I'm very keen on
> > > that.
> > 
> > You shouldn't know anything about the next/prevous filter unless you are
> > the last or the first filter.  In those cases, you know that you are
> > either responsible for generating data, or for reading from/writing to the
> > network.  Anything else that you know is something that your module needed
> > to discover for itself.  What is it that you know about the next/previous
> > filter that you dislike?
> For example, from ap_dechunk_filter:
>             /* Time to read another chunk header or trailer... 
> ap_http_filter() is 
>              * the next filter in line and it knows how to return a
> brigade with 
>              * one line.
>              */

Yeah, but not really.  What we are really saying here is that input
filters in general have two modes, read one line and read a big chunk.  It
is a bit bogus, but that is just how it has to work.  The fact that
ap_http_filter is next is also not exactly true, we just know that
ap_http_filter is later in the chain, so it controls how much data we get
back.  It is more a bad comment than a bad design.

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

View raw message