Permalink
Browse files

updated manifest files to not filter headers returned by the manifest…

… object
  • Loading branch information...
1 parent f96efd9 commit fe3c43628eb010325933d9f5aa8ad15a5feeabe6 @notmyname notmyname committed Aug 19, 2011
Showing with 3 additions and 16 deletions.
  1. +3 −16 swift/proxy/server.py
View
@@ -819,13 +819,7 @@ def listing_iter():
yield obj
marker = sublisting[-1]['name']
- headers = {
- 'X-Object-Manifest': resp.headers['x-object-manifest'],
- 'Content-Type': resp.content_type}
- for key, value in resp.headers.iteritems():
- if key.lower().startswith('x-object-meta-'):
- headers[key] = value
- resp = Response(headers=headers, request=req,
+ resp = Response(headers=resp.headers, request=req,
conditional_response=True)
if req.method == 'HEAD':
# These shenanigans are because webob translates the HEAD
@@ -859,20 +853,13 @@ def head_response(environ, start_response):
content_length = 0
last_modified = resp.last_modified
etag = md5().hexdigest()
- headers = {
- 'X-Object-Manifest': resp.headers['x-object-manifest'],
- 'Content-Type': resp.content_type,
- 'Content-Length': content_length,
- 'ETag': etag}
- for key, value in resp.headers.iteritems():
- if key.lower().startswith('x-object-meta-'):
- headers[key] = value
- resp = Response(headers=headers, request=req,
+ resp = Response(headers=resp.headers, request=req,
conditional_response=True)
resp.app_iter = SegmentedIterable(self, lcontainer, listing,
resp)
resp.content_length = content_length
resp.last_modified = last_modified
+ resp.etag = etag
resp.headers['accept-ranges'] = 'bytes'
return resp

0 comments on commit fe3c436

Please sign in to comment.