You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Peter Wang <pt...@gmail.com> on 2009/06/09 13:50:04 UTC
A question about ap_content_length_filter()
hi, all.
<code>
<?php
// ~/www/htdocs/v.php
header("Content-Type: text/plain");
echo str_repeat('a', intval($_GET['s']));
?>
</code>
test the php code above,
when request with "/v.php?s=8000", I got
HTTP/1.1 200 OK
Date: Tue, 09 Jun 2009 11:41:54 GMT
Server: Apache
Content-Length: 8000
Connection: close
Content-Type: text/plain
it's fine, but while request with "/v.php?s=8001", i got:
HTTP/1.1 200 OK
Date: Tue, 09 Jun 2009 11:43:09 GMT
Server: Apache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
so, my question is: when response size <= 8000,
the request contains a Content-Length field,
otherwise, it uses chunked.
8000 may be very specific on my server, i wonder
where can i tuning such a limit. I have tried to
change output_buffering in php.ini from 4096 to
8192 to tuning that limit, but it seems nothing changes.
thanks for your suggestions.
Re: A question about ap_content_length_filter()
Posted by Dan Poirier <po...@pobox.com>.
Peter Wang <pt...@gmail.com> writes:
> so, my question is: when response size <= 8000,
> the request contains a Content-Length field,
> otherwise, it uses chunked.
>
> 8000 may be very specific on my server, i wonder
> where can i tuning such a limit. I have tried to
> change output_buffering in php.ini from 4096 to
> 8192 to tuning that limit, but it seems nothing changes.
Try adjusting APR_BUCKET_BUFF_SIZE in
srclib/apr-util/buckets/apr_buckets.h (no idea if that'll break
anything, but that's where the 8000 is coming from).
--
Dan Poirier <po...@pobox.com>
Re: A question about ap_content_length_filter()
Posted by "Akins, Brian" <Br...@turner.com>.
On 6/9/09 7:50 AM, "Peter Wang" <pt...@gmail.com> wrote:
> 8000 may be very specific on my server, i wonder
> where can i tuning such a limit.
Yes 8000 is special in the apache response streaming.
Are you using the deprecated mod_php or the supported fastcgi for php?
--
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies