Merge "Fix a response header bug in the error middleware"
This commit is contained in:
commit
298b8d3144
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user