Cinder API logged the following debug message for each request with
empty body:
"Unrecognized Content-Type provided in request get_body"
Check order was fixed in get_body function to follow the correct flow
and display the right message (empty body).
Change-Id: Ie561983a4da791a412fea3fc390dab718dfce191
Closes-Bug: #
1252692
return args
def get_body(self, request):
+
+ if len(request.body) == 0:
+ LOG.debug(_("Empty body provided in request"))
+ return None, ''
+
try:
content_type = request.get_content_type()
except exception.InvalidContentType:
LOG.debug(_("No Content-Type provided in request"))
return None, ''
- if len(request.body) <= 0:
- LOG.debug(_("Empty body provided in request"))
- return None, ''
-
return content_type, request.body
def deserialize(self, meth, content_type, body):