Justin Erenkrantz wrote: >On Sat, Jul 06, 2002 at 12:09:40PM -0700, Ryan Bloom wrote: > > >>Pay attention to what that message says please. It says "The filter >>should always be in the stack, and it should always collect >>information." It doesn't say "The filter should always be touching the >>C-L for the response." We use the data collected by the c-L filter in >>other places, so we should always try to compute the C-L in the filter. >>However, we should NEVER buffer unless we absolutely have to. >> >> > >What data is it collecting? r->bytes_sent? We already know what >that value will be as it will be identical to the C-L. > >To make it concrete as to what I have been suggesting in >ap_content_length_filter: > >if (!ctx) { /* first time through */ > char *c; > c = apr_table_get(r->headers_out, "Content-Length"); >
This won't help us much: in all the cases where the ap_save_brigade() in the C-L filter is a performance problem (e.g., the pipe and SSI examples), we're not going to have a C-L in r->headers_out. And this change will slow down the server, by adding another call to apr_table_get(), which we already know is a performance problem. --Brian