httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Problem with content length filter
Date Sun, 12 Nov 2000 17:39:17 GMT
On Sun, 12 Nov 2000, Brian Havard wrote:

> I'm seeing a problem where I'm getting a 0 length body & have traced the
> sequence of events to:
> - default_handler opens the file to be sent & calls ap_send_fd
> - ap_send_fd passes a brigade containing a file bucket
> - ap_content_length_filter sets the brigade aside & returns
> - default_handler closes the file
> ...
> - core_output_filter tries to send the file but gets nothing because the
> handle is already closed.
> My first hunch is that default_handler shouldn't close the handle, leaving
> it to the file bucket's destructor or the pool cleanup. Alternatively
> either the file bucket create or set-aside could dupe the handle.

Your first hunch is 100% correct.  The default handler shouldn't ever
close anything.  Also, please make sure the default handler is allocating
the file out of the connections pool.  Otherwise, we won't be able to save
the file.  Also, the default handler should be attaching an EOS bucket at
the end of the brigade, because that will keep the content-length filter
from even bothering to save the brigade aside.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message