Use requests.header instead of plain dict

This commit is contained in:
Akira Chiku 2015-11-28 19:26:17 +09:00
parent 9b3fa83730
commit 0c910864d3
2 changed files with 4 additions and 3 deletions

View File

@ -131,7 +131,7 @@ class BaseResponse(_TemplateEnvironmentMixin):
else:
self.region = self.default_region
self.headers = dict(request.headers)
self.headers = request.headers
self.response_headers = headers
return self.call_action()

View File

@ -39,8 +39,9 @@ class KmsResponse(BaseResponse):
try:
key = self.kms_backend.describe_key(key_id)
except KeyError:
self.headers['status'] = 404
return "{}", self.headers
headers = dict(self.headers)
headers['status'] = 404
return "{}", headers
return json.dumps(key.to_dict())
def list_keys(self):