Apache 2.2中的“Transfer-Encoding:chunked”问题

我们的Web服务的客户端之一使用发送HTTP 1.1查询的axis2应用程序:

Transfer-Encoding: chunked 

头。 这样的查询被我们的Apache 2.2拒绝,消息:

 <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 /> 

在Apache日志中有:

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

当我发送这样的消息没有Transfer-Encoding: chunkedContent-Length一切正常。 我search了如何解决这个问题,但我发现只有如何禁用Transfer-Encoding: chunked在客户端Transfer-Encoding: chunked

作为一个客户端,我用soapUI添加/删除了Transfer-Encoding: chunked头文件(当我添加这个头文件时,soapUI不发送Content-Length头文件)。 作为我使用的服务器:CentOS上的Apache / 2.2.3,但是我也在Windows上用“新鲜”的Apache 2.2.15安装来testing它。

有没有办法在服务器端启用分块查询?

从我在apache的网站上发现, chunking只支持HTTP / 1.1,也许你的服务器或软件在configuration中设置为HTTP / 1.0。 http://ws.apache.org/axis2/1_0/http-transport.html

除此之外,我会看看错误信息中指出的文件,看看是否有任何暗示chunking去那里。 {DocumentRoot}/app/webservices/soap.hdb

您可以在axis2.xml上禁用/启用chuncking

拼凑意味着在传输总大小的同时还不清楚,这在dynamic内容生成时很有用。

提示:

HTTP 1.0不支持chuncked编码。