On 30/03/2020 21:45, Christopher Schultz wrote: > All, > > In my application under Tomcat 8.5.51, I have configured a servlet to > allow multipart/form-data submissions and I have added this > configuration as a part of the <servlet> config: > > <multipart-config> > <max-file-size>1048576</max-file-size><!-- 1MiB --> > <max-request-size>1049600</max-request-size><!-- 1 MiB + 1 kiB --> > </multipart-config> > > Without the <multipart-config> section, the upload does not work at > all, so I know I have added this in the right place. > > But I am able to upload files larger than 1MiB, and the data is being > given to the servlet. I was expecting an error to be sent to the > client (unlikely) or the data to be suppressed from the servlet, or > some kind of indication to the servlet code that the upload was too big. > > The file I'm uploading as a test is 13658819 bytes, which is greater > than both 1048576 and 1049600. > > What am I missing, here?
Are you reading the request body directly? That will bypass the size checks. If that doesn't explain it, I'd fire up a remote debugger, debug through an upload and see why the size checks are skipped. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org