You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Aryeh Katz <ar...@secured-services.com> on 2003/08/12 22:14:03 UTC
ap_run_sub_req and content length
I wrote here earlier about using ap_run_sub_req to send a response to a
client, and I receieved excellent advice, thank you.
There is one thing I was wondering.
I see that the Encoding is chunked.
I would prefer to set the Content-Length to the correct length, rather than use
chunked encoding.
How can I do this (other than reading the brigades, then running
ap_set_content)?
Aryeh
---
Aryeh Katz
Secured-Services Inc.
Re: ap_run_sub_req and content length
Posted by Aryeh Katz <ar...@secured-services.com>.
> > I wrote here earlier about using ap_run_sub_req to send a response
> > to a client, and I receieved excellent advice, thank you. There is
> > one thing I was wondering. I see that the Encoding is chunked. I
> > would prefer to set the Content-Length to the correct length, rather
> > than use chunked encoding. How can I do this (other than reading
> > the brigades, then running ap_set_content)?
>
> You don't really have the ability to directly control this.
>
> The content-length filter in combination with ap_set_keepalive
> determine whether chunking is used. Generally speaking, if the first
> ap_pass_brigade call contains the EOS, Content-Length will be sent.
Thanks.
Aryeh
---
Aryeh Katz
Secured-Services Inc.
Re: ap_run_sub_req and content length
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Tuesday, August 12, 2003 16:14:03 -0400 Aryeh Katz
<ar...@secured-services.com> wrote:
> I wrote here earlier about using ap_run_sub_req to send a response to a
> client, and I receieved excellent advice, thank you.
> There is one thing I was wondering.
> I see that the Encoding is chunked.
> I would prefer to set the Content-Length to the correct length, rather
> than use chunked encoding.
> How can I do this (other than reading the brigades, then running
> ap_set_content)?
You don't really have the ability to directly control this.
The content-length filter in combination with ap_set_keepalive determine
whether chunking is used. Generally speaking, if the first ap_pass_brigade
call contains the EOS, Content-Length will be sent. Otherwise, if the
client is HTTP/1.1, it'll use chunking. If it is HTTP/1.0, then
Connection: Close will be used.
Note that HTTP/1.1 mandates support for chunked-encoding. If the client
does not use HTTP/1.0, chunked support will not be sent. -- justin