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