Quick fix for content_length in uwsgi

Change-Id: I72b65557599177b019ff0378276431ad25d29bd5
Closes-Bug: #1298933
This commit is contained in:
Nikolay Markov 2014-03-31 13:30:36 +04:00
parent 21ba4d98f1
commit c3cb141de0

View File

@ -98,7 +98,10 @@ class HTTPLoggerMiddleware(object):
self.api_logger.debug(response_info)
def __logging_request(self, env):
length = int(env.get('CONTENT_LENGTH', 0))
content_length = env.get('CONTENT_LENGTH', 0)
if content_length == '':
content_length = 0
length = int(content_length)
body = ''
if length != 0: