Bill Barker wrote:
I'm -1 on this. It gives the Servlet no indication that anything is
wrong,
and leaves junk in the input stream for the next keep-alive request. I think that it would be better to handle this in the Adaptor's postParseRequest method.
I disagree: the problem with this is that we allocate one array right away based on content-length, not that there's a big upload (which is
fine).
The Adaptor can check for this: if("POST".equalsIgnoreCase(request.getMethod()) && "application/x-www-form-urlencoded".equals(contentType) && request.getContentLength() > connector.getMaxPostSize()) { response.setStatus(413); response.setMessage("POST Body exceeds maximum"); return false; }
This is not very efficient (doing checks there as well as in parse parameters), and what if the servlet intended to stream the body by itself ? (in this case, there's no particular efficiency problem)
So that's why I did do the check lazily (like the parsing itself, which must be lazy).
Remy
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]