Use requests.header instead of plain dict
This commit is contained in:
parent
9b3fa83730
commit
0c910864d3
@ -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()
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user