tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: How to prevent/abort the processing of the multipart request body?
Date Wed, 16 Mar 2011 15:58:26 GMT
Christopher Schultz wrote:
> Hash: SHA1
> André,
> On 3/14/2011 11:19 AM, André Warnier wrote:
>> Mark Thomas wrote:
>>> On 14/03/2011 14:41, André Warnier wrote:
>>>> It still seems to leave open the question as to what "the size limit of
>>>> a MultiPart upload" means exactly.
>>> That is defined by the Servlet 3.0 specification.
>> Is it ?
>> (I couldn't find it there)
> Look for the multipart-config or @MultipartConfig documentation. There
> are attributes to configure both the maximum entity size (the entire
> message) and individual part sizes.

Allright, I found it, p150 :

If a servlet supports fileupload functionality
and processing of mime-multipart requests, the configuration for the same can be
provided via the multipart-config element in the descriptor. The multipart-config element

can be used to specify the location where the files
can be stored, maximum size of the file being uploaded, maximum request size
and the size threshold after which the file will be written to the disk.

With respect, this still does not describe the behaviour.
Suppose there is a web application, with a file-upload capability, and the descriptor 
indicates that the limit for upload should be 10 MB.
A user starts a file upload for a file that is 2 GB in size.
When does the limit kick in ?
Is it as soon as 10 MB have been sent from the client to the Tomcat server, and the server

receives byte # 10,000,001 ?
Or does the server accept the 2 GB, store them, and then provides them to the webapp (via

getPart()), which then complains ?

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

View raw message