From f85f8f954c10071cec083b004900c42830bb15b2 Mon Sep 17 00:00:00 2001 From: Viet Hung Nguyen Date: Wed, 6 May 2015 11:59:09 +0700 Subject: [PATCH] initialize var when POST body is empty or lowdata_fmt will raise exception --- salt/netapi/rest_cherrypy/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/netapi/rest_cherrypy/app.py b/salt/netapi/rest_cherrypy/app.py index a61fa2ab77..a3710605c0 100644 --- a/salt/netapi/rest_cherrypy/app.py +++ b/salt/netapi/rest_cherrypy/app.py @@ -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(