I have a web application running on Tomcat 6.0.29 server and JDK 1.6.
When I send the response to the client, Tomcat sends
Transfer-Encoding: chunked
in the headers when the response size is > 8KB. For responses < 8KB, it sends
Content-Length :
I understand that Chunked encoding is the preferred way to handle bulk responses, however our clients do not want to change their code (as it is distributed all across the servers).
How can I disable Chunked encoding in Tomcat?
I could Disable HTTP/1.1 in Tomcat and enable HTTP/1.0 (not sure how I can do this)
I tried the following with no success:
In Connector tag in server.xml
, I set bufferSize =" 65536"
Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
bufferSize="65536" socketBuffer="65536"
redirectPort="8443" />
Using NIOConnector in server.xml with following configuration:
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
socket.directBuffer="false"
socket.rxBufSize="25188"
socket.txBufSize="43800"
socket.appReadBufSize="32768"
socket.appWriteBufSize="32768"
socket.bufferPool="500"
socket.bufferPoolSize="100000000"
socket.processorCache="500"
socket.keyCache="500"
socket.eventCache="500"
socket.tcpNoDelay="false"
socket.soKeepAlive="true"
socket.soTimeout="5000"
redirectPort="8443" />
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…