Add charset to webob.Response
This extends [0] to a few more locations in the code. [0] Iaf2dd45fc86e3eb5e56be0a3e1582a6ddf960bc1 Change-Id: Ibee536d1da8962cf607f35ac308ba00dbb3b4db2
This commit is contained in:
parent
36da6f0c86
commit
c6b6429675
|
@ -767,7 +767,8 @@ def render_response(body=None, status=None, headers=None, method=None):
|
|||
|
||||
resp = webob.Response(body=body,
|
||||
status='%d %s' % status,
|
||||
headerlist=headers)
|
||||
headerlist=headers,
|
||||
charset='utf-8')
|
||||
|
||||
if method and method.upper() == 'HEAD':
|
||||
# NOTE(morganfainberg): HEAD requests should return the same status
|
||||
|
|
|
@ -82,7 +82,8 @@ class SimpleCert(controller.V3Controller):
|
|||
# NOTE(jamielennox): We construct the webob Response ourselves here so
|
||||
# that we don't pass through the JSON encoding process.
|
||||
headers = [('Content-Type', 'application/x-pem-file')]
|
||||
return webob.Response(body=body, headerlist=headers, status="200 OK")
|
||||
return webob.Response(body=body, headerlist=headers,
|
||||
status="200 OK", charset='utf-8')
|
||||
|
||||
def get_ca_certificate(self, context):
|
||||
return self._get_certificate(CONF.signing.ca_certs)
|
||||
|
|
Loading…
Reference in New Issue