Merge "Keep HeaderKeyDict instance in resp.headers"

This commit is contained in:
Jenkins 2015-10-04 02:28:10 +00:00 committed by Gerrit Code Review
commit 9f15169478

View File

@ -102,8 +102,10 @@ class ObjectController(Controller):
resp.append_copy_resp_body(req.controller_name,
last_modified)
resp.headers = {key: value for (key, value) in resp.headers.items()
if not key.startswith('x-amz-meta-')}
# delete object metadata from response
for key in list(resp.headers.keys()):
if key.startswith('x-amz-meta-'):
del resp.headers[key]
resp.status = HTTP_OK
return resp