Mangled Content-Length header returned from Tomcat
I posted this to tomcat-user with no success. This may be a Debian
Every so often a response to a POST request to Tomcat either fails to
include the Content-Length header or mangles it so it doesn't read
"Content-Length". Such replies occur both when content exists and when
there is no content. I call HttpServletResponse.setContentLength()
every time I build a response, even when the response is of zero-length.
The content type is always set to "application/octet-stream".
Here is what the request headers look like:
POST /Phantom/servlet HTTP/1.1
Host: [host removed]
Here is what the response headers look like:
HTTP/1.1 200 OK
Date: Tue, 25 Feb 2003 17:28:49 GMT
Server: Apache Coyote/1.0
Notice that the Content-Length header is mangled. Also notice that the
HTTP version is 1.1. I have some clients which make use of HTTP 1.0 and
they have not encountered any problems, even though they hit the server
This issue occurs on a Debian Linux box running Tomcat 4.1.16-1 and with
J2SDK1.4.1_01. The box itself is running the stable version of Debian,
while the Tomcat and related packages are from unstable. I haven't seen
this happen on our Windows machine, although that one isn't as
frequently accessed as the Linux box.
Any ideas as to why this is happening?