~notmyname/swift/allowed_headers_head

« back to all changes in this revision

Viewing changes to swift/obj/server.py

  • Committer: John Dickinson
  • Date: 2011-04-19 20:58:37 UTC
  • Revision ID: john.dickinson@rackspace.com-20110419205837-1ful8cp91l5z0h1d
fixed HEAD requests with allowed_headers

Show diffs side-by-side

added added

removed removed

Lines of Context:
649
649
        response = Response(content_type=file.metadata['Content-Type'],
650
650
                            request=request, conditional_response=True)
651
651
        for key, value in file.metadata.iteritems():
652
 
            if key == 'X-Object-Manifest' or \
653
 
                    key.lower().startswith('x-object-meta-'):
 
652
            if key.lower().startswith('x-object-meta-') or \
 
653
                    key.lower() in self.allowed_headers:
654
654
                response.headers[key] = value
655
655
        response.etag = file.metadata['ETag']
656
656
        response.last_modified = float(file.metadata['X-Timestamp'])