Merge "Fix a response header bug in the error middleware"

This commit is contained in:
Jenkins 2014-04-13 17:15:09 +00:00 committed by Gerrit Code Review
commit 298b8d3144

View File

@ -124,7 +124,7 @@ class ParsableErrorMiddleware(object):
except ValueError as err:
body = [json.dumps({'error_message': '\n'.join(app_iter)})]
state['headers'].append(('Content-Type', 'application/json'))
state['headers'].append(('Content-Length', len(body[0])))
state['headers'].append(('Content-Length', str(len(body[0]))))
else:
body = app_iter
return body