On Wed, Jun 18, 2003 at 12:03:50AM -0700, Justin Erenkrantz wrote:
> --On Tuesday, June 17, 2003 11:49 PM -0700 Greg Stein <[EMAIL PROTECTED]> 
> wrote:
> 
> >Definitely possible. But we have no better measure to detect that some
> >output has been generated. Once *some* output has been started (and, say, 
> >it
> >has been buffered by some filter), then the only likely error that would
> >come back from deliver_report is some kind of 5xx error. i.e. bad juju. In 
> >a
> >properly functioning server, that should never happen, so the exposure to
> >this kind of failure mode is very limited.
> 
> How bad would it be if we incorrectly think that no body has been sent when 
> one has been pushed into the chain?  Is it just going to be a 207 with a 
> corrupted XML response - the error body would be appended to whatever has 
> already been sent?

Yes. That is the behavior today. Ben is trying to clean that up. The
proposed patch reduces the chance of these mixed response/error bodies.

> If we guess right (that there has been a body), then 
> it'd be a 207 with the first portion and then a closed connection.  So, 
> either case, the client is just hosed.

Yup.

> Perhaps it makes sense to always emit the error 'body' to the client, then 
> abort the connection.  That way, there is some hint that something is 
> majorly wrong in the server by looking at the content.  Not entirely sure.  

I think dropping the connection on the client rather than sending a bogus
body is probably "better". Neither solution is great, but I'll take a drop
and a truncated response over a bad body.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Reply via email to