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 Mon, 14 Mar 2011 14:41:24 GMT
Mark Thomas wrote:
> On 14/03/2011 11:01, André Warnier wrote:
>> Maybe have a look here :
>> attribute maxPostSize
> Nope. That doesn't apply to multi-part forms since Tomcat doesn't do the
> parameter parsing.
> You want Tomcat 7.0.11 and swallowAbortedUploads from

Hi Mark.

This is what the above online doc says :

Set to false if Tomcat should not read any additional request body data for aborted 
uploads and instead abort the client connection. This setting is used in the following 

     * the size of the request body is larger than the maxPostSize configured in the connector
     * the size limit of a MultiPart upload is reached
     * the servlet sets the response status to 413 (Request Entity Too Large)

Not reading the additional data will free the request processing thread more quickly. 
Unfortunately most HTTP clients will not read the response in case they can not write the

full request.

The default is true, so additional data is being read.

It still seems to leave open the question as to what "the size limit of a MultiPart 
upload" means exactly.  Under Tomcat 7, is this the maxPostSize even for multipart POSTs,

or is this settable somewhere else ?
Also, "the servlet sets the response status to 413" seems to imply that the servlet can 
detect the size of the POST.  But does it know if before the client has finished posting ?

Is there a detailed description somewhere of how POSTs are handled ?

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

View raw message