commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Hermanson <>
Subject FileUploadBase.setFileSizeMax & MultipartStream.ItemInputStream.makeAvailable()
Date Thu, 30 Aug 2007 03:04:21 GMT
setFileSizeMax is apparently intended to prevent the file upload if  
the file about to be uploaded is larger than a given size.  However,  
the exception does not get processed until AFTER the entire file is  
uploaded to the server (thereby defeating the purpose of the limit).   
I went into the debugger and noticed that


is calling


and the call to in that method is actually what's  
causing the entirety of the oversized file upload data to be  
incorrectly read.  The FileUploadBase.FileSizeLimitExceededException  
is correctly being raised, but the subsequent buffer read during  
close is resulting in all of the data being read regardless.  This  
seems like a bug to me, but I am not all that familiar with the code.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message