httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Minor breakage with ap_add_filter
Date Thu, 21 Sep 2000 18:18:51 GMT
On Thu, 21 Sep 2000, Greg Ames wrote:
> wrote:
> > 
> > The recent move of ap_add_filter("CORE",...) has outlined a potential bug,
> > so I thought I would bring it up here and now, so we could all nip it in
> > the bud.  The problem is that we are adding the CORE filter in the
> > core.  This works fine for regular requests, but as soon as we have to add
> > an SSL filter, this will break, because the SSL filter shouldn't require a
> > core change.  I think the solution is to move the ap_add_filter calls from
> > http_core's insert_filter routine to the post_read_request hook.
> >
> Yup - good point, if you assume that SSL must become a filter.  I can
> think of other possible good designs, but filters could work.  
> If it does become a filter, seems like BUFF should be decomposed further
> to avoid duplicating code.  Buffering across pipelined requests, for
> example, would be common to SSL sockets and regular sockets, right?.  

BUFF needs to go away.  I have been saying that for a while.  It is
cramming too much into one type.  By separating out the BUFF logic into
four or five simple filters, we remove a lot of complexity, and make
things more modular.

> > I took a quick look at where the ap_add_filter call was added yesterday,
> > and it is always just before the post_read_request hook is called.  I
> > would like to add an AP_HOOK_REALLY_FIRST function to http_core, which
> > will add all of the core filters.  The reason for the
> > AP_HOOK_REALLY_FIRST is that we want to make sure that there is always a
> > CORE filter on the filter stack when we call out to other modules.
> > 
> > Does anybody have a problem with doing this?  Does anybody see a hole that
> > I missed?
> > 
> No, that sounds like a good start, until we become more experienced with
> this stuff anyway.

Cool, I'll make the change later today.


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

View raw message