summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Alvares Gomes <lucasagomes@gmail.com>2017-01-03 10:12:12 +0000
committerSteve Martinelli <s.martinelli@gmail.com>2017-01-09 16:23:41 -0500
commit5eebd22ccf962b3fb1b31750d3d48c7e604d010d (patch)
tree84e4be6105c98057cd48224a1a27fedaa57f9442
parent4df2cc4aba2035782ac1fc66f321c90a1b3bb854 (diff)
downloadkeystonemiddleware-5eebd22ccf962b3fb1b31750d3d48c7e604d010d.tar.gz
Fix gate for newton
The gate is wedged and this is a combination of two commits. 1. 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 20fb1dbe5a884ecdbf6ee5ea26b2660f7a7e4b1e 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 (cherry-picked from: 2092d5783607223c7cbdfed690997e9c9f831b6f) 2. Add docutils contraint on 0.13.1 to fix building See: http://lists.openstack.org/pipermail/openstack-dev/2016-December/108742.html Change-Id: Ied3c922b8bbb52a3589c2f5308ecf87fc1415fbc (cherry-picked from: 29a879c0ed5d1af5dca0cf6fd0394487f97b1670)
-rw-r--r--keystonemiddleware/auth_token/__init__.py1
-rw-r--r--test-requirements.txt1
2 files changed, 2 insertions, 0 deletions
diff --git a/keystonemiddleware/auth_token/__init__.py b/keystonemiddleware/auth_token/__init__.py
index 28ad2a2..ef7aac6 100644
--- a/keystonemiddleware/auth_token/__init__.py
+++ b/keystonemiddleware/auth_token/__init__.py
@@ -579,6 +579,7 @@ class AuthProtocol(BaseAuthProtocol):
raise webob.exc.HTTPUnauthorized(
body=jsonutils.dumps(body),
headers=self._reject_auth_headers,
+ charset='UTF-8',
content_type='application/json')
if request.user_token_valid:
diff --git a/test-requirements.txt b/test-requirements.txt
index 97b9086..ff6fe61 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -6,6 +6,7 @@ hacking<0.11,>=0.10.0
flake8-docstrings==0.2.1.post1 # MIT
coverage>=3.6 # Apache-2.0
+docutils>=0.11,!=0.13.1 # OSI-Approved Open Source, Public Domain
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0 # BSD
pycrypto>=2.6 # Public Domain