Auth token, set the correct charset
Explicit set the charset to UTF-8 when replying with 401. It's now
required by webob.
A previous attempt to fix this problem was introduced as part of the
commit 20fb1dbe5a
but this is only
compatible with the version 1.7.0 of WebOb, older versions will break.
See:
http://logs.openstack.org/05/371605/12/check/gate-ironic-python35-db/686bd86/console.html#_2017-01-03_11_10_11_760197
Change-Id: I30adc87882ce8bd2c18588161d5c60d77a56925e
Closes-Bug: #1653646
This commit is contained in:
parent
dfd53e5551
commit
2092d57836
@ -651,7 +651,8 @@ class AuthProtocol(BaseAuthProtocol):
|
||||
raise webob.exc.HTTPUnauthorized(
|
||||
body=jsonutils.dumps(body),
|
||||
headers=self._reject_auth_headers,
|
||||
content_type='application/json; charset=UTF-8')
|
||||
charset='UTF-8',
|
||||
content_type='application/json')
|
||||
|
||||
if request.user_token_valid:
|
||||
request.set_user_headers(request.token_auth.user)
|
||||
|
Loading…
Reference in New Issue
Block a user