httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <>
Subject RE: Baffled by the negotation fix...
Date Sat, 02 Mar 2002 00:50:16 GMT
> On Fri, Mar 01, 2002 at 03:12:27PM -0600, William A. Rowe, Jr. wrote:
> > I believe the attached .patch file should resolve our issues with
> > subrequest
> > negotiation.  Essentially, we want the sub request to build a new
> > chain if
> > we plan on using the subrequest as a 'fast internal redirect'.
> >
> > This patch does just that, when we fast redirect, we replace the
> original
> > request
> > filters with the new request filters.  In preparing the request, we
> back
> > to our
> > favorite r->connection filters to start, when we are making the
> subrequest
> > with
> > a NULL next_filter.
> >
> > But the patch is broken.  Free beer at ApacheCon 2002 to the first
> hacker
> > who
> > untangles the misbehavior that fouls up this patch.  Make that hard
> stuff if
> > you
> > discover it's a simple bug in my patch :)
> >
> > One hint.  I think our whole "Either Connection or Request" idea of
> filters
> > is
> > borked.  It really seems that "Either Connection or Protocol or
Body" is
> a
> > much
> > better model - this bug seems to prove that once again.  I think we
> really
> > wanted
> > to grab r->http_input_filters and r->protocol_output_filters when we
> up
> > the
> > subreq of next_filter==NULL.  But there doesn't appear to be such a
> thing.
> Yup, you're right.  We need to add protocol-specific filters that
> can be arbitrarily reset.  Hint: this is just what reset_filters
> does, but its static.  Notice that we do this when we are about
> to serve an HTTP error - the same concept of a subreq applies to
> the error condition.
> To prove that, this patch works for me.  So, what I think we should
> do is add a protocol hook that says, "add all of your required
> filters if this is your protocol."  How does that sound?  -- justin

I don't understand how this is working.  The original code from Will
came from a discussion that he and I had over the phone.  My question is
how were the protocol specific filters removed in this case?

Oh, damn, the problem is that these filters are request specific instead
of connection specific.  What we really need, is a filter type that is
request specific, but that isn't specifically tied to the request.
Basically another field in the request_rec, which would store all store
all HTTP_HEADER filters.  That way, they wouldn't be lost for
sub-requests and internal redirects.


View raw message