Mangled Content-Length header returned from Tomcat
I posted this to tomcat-user with no success. This may be a Debian
issue.
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
User-Agent: PhantomClient
Host: [host removed]
Content-Length: 60
Cookie: JSESSIONID=7DC08E2E8C001438E6510500EDC06D07
Here is what the response headers look like:
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Lengtd><b
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
very frequently.
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?
thanks,
ian.
Reply to: