Checks for an empty body in action requests and bottoms out appropriately.

This commit is contained in:
Ed Cranford
2012-06-13 15:41:49 -05:00
parent f89cd59be7
commit d6f515ca3f

View File

@@ -106,6 +106,8 @@ class InstanceController(BaseController):
LOG.info("req : '%s'\n\n" % req)
LOG.info("Comitting an ACTION again instance %s for tenant '%s'"
% (id, tenant_id))
if not body:
raise exception.BadRequest(_("Invalid request body."))
context = req.environ[wsgi.CONTEXT_KEY]
instance = models.Instance.load(context, id)
_actions = {