Problem with “Transfer-Encoding: chunked” in Apache 2.2

apache-2.2axischunkedhttp

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>
</head><body>
<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 127.0.0.1] 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?

Best Answer

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. http://ws.apache.org/axis2/1_0/http-transport.html

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