httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <>
Subject Re: AW: 2.2 mod_http_proxy and "partial" pages
Date Fri, 09 Dec 2005 05:21:58 GMT
On Thu, Dec 08, 2005 at 08:38:53PM -0800, Roy Fielding wrote:
> On Dec 8, 2005, at 6:58 AM, Justin Erenkrantz wrote:
> >On Wed, Dec 07, 2005 at 06:16:42PM -0800, Roy Fielding wrote:
> >>Setting the inbound c->aborted within a filter just to indicate
> >>that the outbound connection has died is wrong -- it prevents
> >>other parts of the server (that are working fine) from correctly
> >>handling the bad gateway response.
> >
> >FWIW, it's not a filter - it's the handler itself that is setting
> >c->aborted.
> The handler is just the top of the filter stack.  The point is that
> it doesn't know anything about the other end (the c connection) and
> thus can't know if it should be aborted.  waka, for example, has an
> abort mechanism on the wire and thus would be horribly abused by
> such a workaround.

Even with an EOS bucket, how will we indicate that the connection should be
aborted?  (i.e. don't try to do any further writes?)

(See below as to why an EOS doesn't do anything.)

> >If you have another idea how to specify via the handler that the  
> >connection
> >needs to be dropped, I'm all ears.  But, I couldn't see one.  --  
> >justin
> I would extend the EOS bucket data to be an errno and then have
> mod_cache check for that data != 0 when it does its EOS check.

For httpd's filters, an EOS bucket data doesn't attempt a close of the
stream: in fact, EOS doesn't do anything to the socket.  By the time we
start writing the body, all of the filters that know HTTP are long gone.
(The only thing that might be left is a chunking output filter.)  Plus,
with apr's bucket types, there is no mechanism to associate that type of
error condition.

> I am surprised it wasn't implemented that way in the first place.

I am too, but I'd like to be able to resolve this veto without radically
having to redesign filters in httpd.  =)

FWIW, serf doesn't have these sorts of problems; that's one of the (many)
things we corrected with serf's filter design.  -- justin

View raw message