initialize var when POST body is empty

or lowdata_fmt will raise exception
This commit is contained in:
Viet Hung Nguyen 2015-05-06 11:59:09 +07:00
parent aa5fb0aa46
commit f85f8f954c

View File

@ -537,6 +537,7 @@ def hypermedia_in():
if (cherrypy.request.method.upper() == 'POST'
and cherrypy.request.headers.get('Content-Length', '0') == '0'):
cherrypy.request.process_request_body = False
cherrypy.request.unserialized_data = None
cherrypy.request.body.processors.clear()
cherrypy.request.body.default_proc = cherrypy.HTTPError(