Author |
|
deepakd
Joined: 03 Jan 2011 Posts: 2 Location: san diego
|
Posted: Mon 03 Jan '11 20:35 Post subject: configure chunked encoding in apache-2.2 |
|
|
How can i configure apache 2.2. webserver to send out chunked encoding response to client’s request.
My client can’t handle say more than 2K of response body and I want apache to send out chunked response..
any help please
DD |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 04 Jan '11 13:54 Post subject: |
|
|
it's about KeepAlive. Did you set somewhere downgrade-1.0 or force-response-1.0
The point of chunked encoding is that it's sent out only when a
number of conditions are met:
* The client supports chunked encoding
- This is implied by a client advertising itself as HTTP/1.1
- or by clients who explicitly send out the TE request header
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.39)
* The server cannot determine the content length.
- For a User-Agent using a protocol prior to HTTP/1.0, the content
simply will be sent out without a Content-Length header.
This means that it's very easy to provoke a chunked transfer-encoding
from a module producing dynamic content. |
|
Back to top |
|
deepakd
Joined: 03 Jan 2011 Posts: 2 Location: san diego
|
Posted: Tue 04 Jan '11 19:44 Post subject: |
|
|
James Blond wrote: | it's about KeepAlive. Did you set somewhere downgrade-1.0 or force-response-1.0
The point of chunked encoding is that it's sent out only when a
number of conditions are met:
* The client supports chunked encoding
- This is implied by a client advertising itself as HTTP/1.1
- or by clients who explicitly send out the TE request header
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.39)
* The server cannot determine the content length.
- For a User-Agent using a protocol prior to HTTP/1.0, the content
simply will be sent out without a Content-Length header.
This means that it's very easy to provoke a chunked transfer-encoding
from a module producing dynamic content. |
We are not serving dynamic content but just the static content.
thanks |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 04 Jan '11 21:07 Post subject: |
|
|
Apache 2 should allow chunked by default on 1.1 clients with Keepalives turned on.
--- edit ---
if you realy have to you can remove the content lengh header
Code: |
Header unset Content-Length
|
|
|
Back to top |
|
bofrobber
Joined: 11 Aug 2012 Posts: 3 Location: china,beijing
|
Posted: Sat 11 Aug '12 8:31 Post subject: set chunked failure |
|
|
James Blond wrote: | Apache 2 should allow chunked by default on 1.1 clients with Keepalives turned on.
--- edit ---
if you realy have to you can remove the content lengh header
Code: |
Header unset Content-Length
|
|
hello:
As you help: I delete char '#' in line #LoadModule headers_module modules/mod_headers.so and I add a line Header unset Content-Length in configuration.
but the server also send content-length in response.
can you help me? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 13 Aug '12 12:19 Post subject: |
|
|
Did you monitor the headers? Apache error log? Apache version? |
|
Back to top |
|
bofrobber
Joined: 11 Aug 2012 Posts: 3 Location: china,beijing
|
Posted: Tue 21 Aug '12 12:13 Post subject: |
|
|
I use wireshark to monitor recv network data.I find the data not chunked format. Apache also use content-length to send data.
I don't know how to configure. I search this question in google. But I can't find le solution. so I want to get help from here. |
|
Back to top |
|
bofrobber
Joined: 11 Aug 2012 Posts: 3 Location: china,beijing
|
Posted: Tue 21 Aug '12 12:17 Post subject: |
|
|
downlaod data or html page is ok.
and I try to download failure. sometimes I find the error page use chunked. But it doesn't hapen when download url is exist.
and the apache version is the lastest version2.2 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 22 Aug '12 13:46 Post subject: |
|
|
bofrobber wrote: | But it doesn't hapen when download url is exist. |
You deliver the files by PHP or so? |
|
Back to top |
|