Archive for the ‘JSP’ Category

Sun’s version of “640k”: 2GB ServletResponse Content-Length

Friday, May 22nd, 2009

Yes, Sun Microsystems said that 2GB’s enough for everyone to download…

That is because of the setContentLength(int) method only take an int! Java’s int is 32-bits, and it is signed, meaning a 2^31 (=2GB) limit on the size…! Sun’s refused of fixing this for ages…

Whether or not Bill Gates ever actually said that 640k should be enough for everyone, Sun certainly seems to have recreated their own version with javax.servlet.ServletResponse.

LINK: http://blogger.ziesemer.com/2008/03/suns-version-of-640k-2gb.html