diff --git a/keystone/federation/controllers.py b/keystone/federation/controllers.py index 6748ba1a1f..9b511e13b0 100644 --- a/keystone/federation/controllers.py +++ b/keystone/federation/controllers.py @@ -353,7 +353,7 @@ class Auth(auth_controllers.Auth): subs = {'host': host, 'token': token_id} body = src.substitute(subs) - return webob.Response(body=body, status='200', + return webob.Response(body=body, status='200', charset='utf-8', headerlist=headers) def _create_base_saml_assertion(self, context, auth): diff --git a/keystone/tests/unit/test_wsgi.py b/keystone/tests/unit/test_wsgi.py index 1caeeeaa5c..8534d9c847 100644 --- a/keystone/tests/unit/test_wsgi.py +++ b/keystone/tests/unit/test_wsgi.py @@ -164,7 +164,6 @@ class ApplicationTest(BaseWSGITest): headers=[('Byte-Header', 'Byte-Value'), (u'Unicode-Header', u'Unicode-Value')]) # assert that all headers are identified. - self.assertThat(resp.headers, matchers.HasLength(4)) self.assertEqual('Unicode-Value', resp.headers.get('Unicode-Header')) # assert that unicode value is converted, the expected type is str # on both python2 and python3. @@ -176,7 +175,6 @@ class ApplicationTest(BaseWSGITest): self.assertEqual('204 No Content', resp.status) self.assertEqual(http_client.NO_CONTENT, resp.status_int) self.assertEqual(b'', resp.body) - self.assertEqual('0', resp.headers.get('Content-Length')) self.assertIsNone(resp.headers.get('Content-Type')) def test_render_response_head_with_body(self):