Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of client of our web service uses axis2 application that sends HTTP 1.1 query with:

Transfer-Encoding: chunked

header. Such a query is refused by our Apache 2.2 with message:

<title>411 Length Required</title>
<h1>Length Required</h1>
<p>A request of the requested method POST requires a valid Content-length.<br />

In Apache logs there is:

[Mon May 17 09:06:04 2010] [error] [client] chunked Transfer-Encoding forbidden: /app/webservices/soap.hdb

When I send such message without Transfer-Encoding: chunked and with Content-Length all works ok. I searched how to solve this problem, but I found only how to disable Transfer-Encoding: chunked on client side.

As a client I used soapUI where I added/removed Transfer-Encoding: chunked header (when I added this header soapUI do not send Content-Length header). As a server I use: Apache/2.2.3 on CentOS, but I tested it also with "fresh" install of Apache 2.2.15 on Windows.

Is there any way to enable chunked queries on the server side?

share|improve this question
up vote 1 down vote accepted

from what i found on apache's web site, chunking is only supported by HTTP/1.1, perhaps your server or software is set for HTTP/1.0 in the configuration.

other than that, i would look at the file indicated in the error message and see if there is any hinting at chunking going on there. {DocumentRoot}/app/webservices/soap.hdb

share|improve this answer
Thanks, but the link shows how to configure axis (i.e. client side). I think there is no problem with resource because it can be retrieved with "unchunked" query. Apache HTTP server refuses query without Content-Length and do not try to do anything else with such query. – Michał Niklas May 18 '10 at 4:51
is there anything in that file that hints at chunking? – cpbills May 18 '10 at 21:01
Normally {DocumentRoot}/app/webservices/soap.hdb is served by module. But it seems that Apache do not try to execute this module. I can enable debug mode for this module and then it creates log when invoked. For queries without Content-Length such log is not created. – Michał Niklas May 19 '10 at 4:53
It seems that the module that is used do not accept chunked queries. Thanks! – Michał Niklas Jun 18 '10 at 10:03

You could disable/enable chuncking on axis2.xml

Chuncking means that while transfering the total size is unknown, this is helpful when dynamic content is generated.


HTTP 1.0 doesn't support chuncked encoding.

share|improve this answer
OK. I know it. I know how chunked HTTP request looks and I know most clients (soapUI, default Perl and Python SOAP libraries) do not use chunked request. But I have "dummy" client who do not want to change default axis2 settings (HTTP 1.1 with chunking). So maybe it would be easier for me to enable chunking queries (no Content-Length) on Apache. – Michał Niklas May 21 '10 at 19:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.