Hi.
I'm using current validation code on my HTTPServlet to check if the
user uploads big files:
public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
long maxSize = 1024*1024 * 1; //Limit 50 MB
int contentLength = req.getContentLength();
if (contentLength < 0 || contentLength > maxSize) {
res.sendError(509, "CHAP@: "+contentLength+" BYTE-a");
}

else {
    //// It's ok
       }
In the development mode req.getContentLength(); Returns me the
correct
size of the data I'm uploading, but when I deploy my application to
App Engine And run my application req.getContentLength(); returns me
-1. Please tell me what is wrong and please suggest me how can I
solve
that problem...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to