Hi

I'm sorry if I'm asking this in the wrong place, but I'm not sure where my
problem is actually occuring, I thought Tomcat itself might be able to help.

I'm trying to build an app that allows users to upload files to the
webserver.
My problem is I need to prevent them uploading large (more than a few MB)
files, which will waste both their bandwidth and mine. I'm using Jakarta
Commons FileUpload (http://jakarta.apache.org/commons/fileupload/) to parse
the multipart form, but it can't seem to prevent the end-users uploading
large files. The user sends the large file and then once it's finished,
FileUpload will display the error. But the user still wasted all that
bandwidth. I even tried just throwing an exception straight away on the JSP
page the form submits to, but the file is still sent.

I tried placing a maxPostSize="2000000" in my server.xml Connector on port
8080. This didn't seem to have any effect though, even after restarting
Tomcat.

I'm using Tomcat 5.0.16 in standalone mode, port 8080.

If anyone has any suggestions on how I can prevent the waste of bandwidth
(and possible DoS attacks) please let me know.

Thanks
Brad Gorman






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to