httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] httpd discards body too soon
Date Tue, 25 Jun 2002 22:55:52 GMT
On Tue, Jun 25, 2002 at 03:21:29PM -0700, Justin Erenkrantz wrote:
>...
> Okay, the problem is that ap_discard_request_body now checks the
> keepalive status of the connection (correctly defaults to 0 which
> means that ap_discard_request_body never discards requests).

I'm not sure that "correctly defaults to 0" is truly correct. It seems that
we would want a tri-state value for that variable: unknown, connection-
closes, and connection-stays-open.

This would have solved the problem at hand because the value would have been
"unknown", so the discard would have happened.

>...
> This is a temporary fix, as I think we need to rethink checking the
> connection status in ap_discard_request_body since the connection
> status is only set once ap_http_header_filter is involved.  This
> pretty much invalidates calling ap_discard_request_body() anywhere
> except once we know the EOS is sent.  -- justin

What do you think of the tri-state solution?

It *does* mean that we might discard a body, but then later find out we
didn't need to. However, it would remove an accidental non-discard.

Cheers,
-g

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

Mime
View raw message