httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: CGI single-byte reads Re: 2.0.30-dev load spiking [was: upgrade to FreeBSD 4.5-PRERELEASE]
Date Thu, 24 Jan 2002 05:04:15 GMT
On Fri, Jan 04, 2002 at 11:39:27PM -0800, Brian Pane wrote:
> The one-byte reads are for the CGI's response header.  The problem is that
> mod_cgi hands off the pipe (non-buffered) to ap_scan_script_header_err(),
> which does single-byte reads until it finds the end of the header.  After
> that, mod_cgi finally builds a pipe-bucket, which is buffered, so the 
> reading
> of the content happens in much larger chunks.
> 
> The easiest solution I can think of is to change ap_scan_script_header_err()
> to accept a brigade rather than an apr_file_t, so that we can take advantage
> of the pipe bucket's buffering when reading the headers.

I've just committed a note about this in STATUS. I think converting
it to take a brigade is the way to go.

-aaron

Mime
View raw message