You can always provide content length value using setHeader like methods to avoid int
limitations. Tomcat shouldn't overwrite header value if it's already set. You can also
use chunked out where content length simple ignored for files greater than 2GB.
Dmitry R., [EMAIL PROTECTED]
Chief Software Architect, MetricStream.COM
Santa Clara, CA
-----Original Message-----
From: David Daney [EMAIL PROTECTED]
Sent: Thu, 30 Aug 2001 14:47:40 -0700
To: [EMAIL PROTECTED]
Subject: Content-Length limited to 2^31-1???
The problem I am having is that tomcat 3.2.3 seems to (kind of) limit
content length to Integer.MAX_VALUE (2^31-1 or 2GB).
If I want to serve very large objects things do not work so well.
I seems that ServletResponse.SetContentLength(int) is the prefered
manner to sent the content length of a servlet response and that the
default implemtation for the "HEAD" method in HttpServlet also is
limited to the range of int values.
My reading of the HTTP/1.1 spec does not indicate that there are any
limitations to content length in the HTTP protocol.
So my question is: Am I all messed up, or is Tomcat and the servlet
spec/implementation sub-optimal?
David Daney
___________________________________________________________________________
Visit http://www.visto.com.
Find out how companies are linking mobile users to the
enterprise with Visto.