Reputation: 5259
I was wondering what is the best way to limit the size of requests made by a single client. For example
String password = request.getParameter("password");
Let's say the client was sending a password of length 10,000. I could perform a check on the length of the string and ignore it if larger than a certain size but then 10,000 useless bytes have still made their way into my application. Is their a way of limiting the size of requests at a much lower level in the network stack?
Upvotes: 0
Views: 104
Reputation: 78
According to this link you can remove the POST size, I assume that it works both ways and you can set the limit on the POST size to something like 4KB in your server.xml file.
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
Upvotes: 1