diff --git a/VERSION b/VERSION index bfb7e61b..7c9d5e0f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-16 22:28:14) dev +Version 2.00.0 (2012-07-16 22:36:26) dev diff --git a/gluon/main.py b/gluon/main.py index c24f45c8..97832023 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -268,7 +268,10 @@ def parse_get_post_vars(request, environ): request.vars[key] = request.get_vars[key] # parse POST variables on POST, PUT, BOTH only in post_vars - request.body = copystream_progress(request) ### stores request body + try: + request.body = copystream_progress(request) ### stores request body + except IOError: + raise HTTP(400,"Bad Request - HTTP body is incomplete") if (request.body and request.env.request_method in ('POST', 'PUT', 'BOTH')): dpost = cgi.FieldStorage(fp=request.body,environ=environ,keep_blank_values=1) # The same detection used by FieldStorage to detect multipart POSTs