On Sun, 26 Aug 2001, Ryan Bloom wrote:
> On Sunday 26 August 2001 15:53, Marc Slemko wrote:
> > if I have a CGI that generates less than 8k of output, the content length
> > doesn't get set.
> >
> > If it generates between 8k and 32k or something like that, it does.
> >
> > is this a known bug?
>
> Why are you assuming this is a bug? It looks like in the first request, we are
>unable
> to read the data for some reason, but the second request, when the content-length
> filter tries to read the CGI data, it is able to.
>
> The C-L filter tries to determine how much data is there, if it can't read
>everything,
> then it just passes to the next filter, and we use either chunking, or we close the
> connection after the request.
Erm... why would we be unable to read the data?
I have the exact same CGI. If I have it output, for example, 6k of data
there is never a content-length. If I have it output, for example, 10k of
data, there is.
Sure, once you go _above_ 32k (erm.. 4*AP_MIN_BYTES_TO_WRITE I think)
then it won't buffer. But that isn't the issue. The _smaller_ response
isn't getting the content-length added. The content length filter is
calling ap_set_content_length with the right value, but it never
makes it to the client... don't know what is going on there.