Details
Description
I ran into this problem where I was trying to serve up a 144458731520 byte file via DefaultServlet and the trouble seems to be that writing the ContentLength header chokes at BufferUtil.putDecLong(Buffer, long):
http://jetty.codehaus.org/jetty/jetty-6/xref/org/mortbay/io/BufferUtil.html#236
...because decDivisors doesn't cover the full range of long:
http://jetty.codehaus.org/jetty/jetty-6/xref/org/mortbay/io/BufferUtil.html#283
.
The viewed behavior is:
if 0 <= contentLength < 10^10, Content-Length is set fine
if 10^10 <= contentLength < 1.6*10^10, the first character of the Content-Length's value is a hex character
and if 1.6*10^10 <= contentLength, we get an ArrayIndexOutOfBoundsException
.
Want a patch? Thanks,
Oh that's a silly bug... and a pity we just missed 6.1.24!
Have you tried it with the extra divisors? are there any other problems?
I'll add the devisors to 6 now, but they wont be in a release for some time.
However, they will be in the imminent release of jetty-7.