Merge pull request #130 from ed-/empty-body-fix

Checks for an empty body in action requests and bottoms out appropriately
This commit is contained in:
Nirmal Ranganathan 2012-06-13 14:28:03 -07:00
commit c51a4e4f8e

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 = {