logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: configure chunked encoding in apache-2.2
Author
deepakd



Joined: 03 Jan 2011
Posts: 2
Location: san diego

PostPosted: Mon 03 Jan '11 20:35    Post subject: configure chunked encoding in apache-2.2 Reply with quote

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

PostPosted: Tue 04 Jan '11 13:54    Post subject: Reply with quote

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

PostPosted: Tue 04 Jan '11 19:44    Post subject: Reply with quote

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

PostPosted: Tue 04 Jan '11 21:07    Post subject: Reply with quote

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

PostPosted: Sat 11 Aug '12 8:31    Post subject: set chunked failure Reply with quote

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

PostPosted: Mon 13 Aug '12 12:19    Post subject: Reply with quote

Did you monitor the headers? Apache error log? Apache version?
Back to top
bofrobber



Joined: 11 Aug 2012
Posts: 3
Location: china,beijing

PostPosted: Tue 21 Aug '12 12:13    Post subject: Reply with quote

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

PostPosted: Tue 21 Aug '12 12:17    Post subject: Reply with quote

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

PostPosted: Wed 22 Aug '12 13:46    Post subject: Reply with quote

bofrobber wrote:
But it doesn't hapen when download url is exist.

You deliver the files by PHP or so?
Back to top


Reply to topic   Topic: configure chunked encoding in apache-2.2 View previous topic :: View next topic
Post new topic   Forum Index -> Apache