httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <...@covalent.net>
Subject RE: Discarding bodies multiple times
Date Sat, 01 Jun 2002 00:14:58 GMT
> From: Justin Erenkrantz [mailto:jerenkrantz@apache.org]
> 
> On Fri, May 31, 2002 at 02:21:52PM -0700, Ryan Bloom wrote:
> > Without this fix, the entire test suite fails, because the HTTP_IN
> > filter is sending requests with 0 Content-Length to the
> > CORE_INPUT_FILTER to read the body.  This means that every request
times
> > out after some timeout.  It has nothing to do with Jeff's problem,
> > because EVERY test was taking forever.  I did run the test-suite, so
if
> > this breaks anything, there is no test for it.
> 
> Well, it's any request where ap_discard_request_body() is called
> more than once.  In the case of apache/404.t, default_handler calls
> ap_discard_request_body() and then ap_die() calls it too.
> 
> I'm not terribly sure if this sequence is valid.  Why is
> default_handler discarding the body if it can't handle the
> request?  Shouldn't we only discard the body right before we
> send the response?

The default handler discards the body, because it can't handle a body.
The assumption is that if the request gets to default_handler, then no
body will be allowed.  There are only two options as I see it.  1)  Keep
a record of having received an EOS in the request_rec.  2)  Only call
ap_discard_request_body if the default_handler will succeed.

Ryan
> 
> Or, we could add an eos_gotten to request_rec to indiciate
> that the input filters have received EOS so that
> discard_request_body won't be re-entrant.  I dunno.  -- justin


Mime
View raw message