Merge pull request #193 from kouk/master

Fix for S3 metadata on moto_server
This commit is contained in:
Steve Pulec 2014-09-10 20:36:35 -04:00
commit 0847334a1f

View File

@ -229,7 +229,7 @@ class ResponseObject(object):
meta_regex = re.compile('^x-amz-meta-([a-zA-Z0-9\-_]+)$', flags=re.IGNORECASE) meta_regex = re.compile('^x-amz-meta-([a-zA-Z0-9\-_]+)$', flags=re.IGNORECASE)
if replace is True: if replace is True:
key.clear_metadata() key.clear_metadata()
for header in request.headers: for header, value in request.headers.items():
if isinstance(header, six.string_types): if isinstance(header, six.string_types):
result = meta_regex.match(header) result = meta_regex.match(header)
if result: if result: