From 0f8089ccdfd56e2a7db3c5ae3f46081fa1e12e8f Mon Sep 17 00:00:00 2001 From: Michael Barton Date: Fri, 14 Jan 2011 04:14:25 +0000 Subject: [PATCH] unit tests --- swift/common/middleware/swift3.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swift/common/middleware/swift3.py b/swift/common/middleware/swift3.py index 768ca356c2..979c007538 100644 --- a/swift/common/middleware/swift3.py +++ b/swift/common/middleware/swift3.py @@ -198,10 +198,10 @@ class ObjectController(Controller): if 200 <= status < 300: new_hdrs = {} for key, val in headers.iteritems(): - key = key.lower() - if key.startswith('x-object-meta-'): + _key = key.lower() + if _key.startswith('x-object-meta-'): new_hdrs['x-amz-meta-' + key[14:]] = val - elif key in ('content-length', 'content-type', + elif _key in ('content-length', 'content-type', 'content-encoding', 'etag', 'last-modified'): new_hdrs[key] = val return Response(status=status, headers=new_hdrs, app_iter=app_iter)