There were in fact bugs with requests > 2GB in both Tomcat and mod_jk which were fixed recently, as Rainer pointed out. (And some of the code was using -1 if the content-length was too large.) Upgrading to 6.0.14 or the next 5.5 release should fix the problem.
There's no size limit on commons-fileupload as far as I can tell, but I've never tried it with a huge file. -- Len On 8/16/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > DAvid, > > David Hesson wrote: > > The > > content-length has a maximum value of 2.x billion, which is right under > > two gigabytes. > > Is this a limit on commons-upload? The header itself can contain an > arbitrarily high number, so there's no inherent file-size limit on > uploads over HTTP. > > > A 2.xGB file will result in a negative content length > > from integer overflow into the final, negative bit position. > > I don't think so. Java doesn't overflow like C does. Attempting to read > an int that's too big results in an exception, not a negative result: > > $ cat > IntReadTest.java > public class IntReadTest > { > public static void main(String[] args) > { > System.out.println(Integer.parseInt(args[0])); > } > } > ^D > $ javac IntReadTest > $ java IntReadTest 2147483647 > 2147483647 > $ java IntReadTest 2147483648 > Exception in thread "main" java.lang.NumberFormatException: For input > string: "2147483648" > at > java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) > at java.lang.Integer.parseInt(Integer.java:463) > at java.lang.Integer.parseInt(Integer.java:497) > at IntReadTest.main(IntReadTest.java:5) > $ > > Now, if you were using an old version of mod_jk (which you didn't > mention), it's possible that the Content-Length header is being > corrupted. Since you have a filter chain, can you print the (String) > value of the Content-Length header before processing begins? That would > be helpful. > > - -chris > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGxFDy9CaO5/Lv0PARAtz1AJ9G5qHlz2n6nY2km68upW80z5OfOwCfTlo4 > rDUomEV/r/L3L7DcjruMysc= > =tjSt > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]