Hi > > Short question: How can I prevent tomcat to receive the complete post > data? > > Stop sending the data before it's all been sent.
Sorry, I don't understand what you mean. If you mean to send only small parts and only those that are wanted, that's nothing I can do. I need to support the upload of really huge files (tested up to 9 GB so far and need to go beyond), while I cannot allow any user to block the complete bandwidth by uploading gigabytes of files that are not wanted - which I can usually detect within the first few bytes. And the thing they are uploading is exactly one file... The browser cannot split them. > AFAIK Tomcat processes the request before the user code in a servlet is > active, so you can't do it from inside a servlet. Hm. Tomcat does NOT parse these POST parameters (at least not by default and not in my case). I know for sure, that my code detects unwanted files with only a few bytes received. (I can tell by printing a simple line to the logs, and I can see that line nearly immediately after starting a 9GB upload, yet the browser continues to upload everything.) I just cannot cancel the upload. Regards, Steffen
smime.p7s
Description: S/MIME cryptographic signature