~hudson-openstack/swift/trunk

« back to all changes in this revision

Viewing changes to swift/obj/server.py

  • Committer: Tarmac
  • Author(s): gholt
  • Date: 2011-06-16 21:12:04 UTC
  • mfrom: (305.2.6 postcopy)
  • Revision ID: tarmac-20110616211204-s5slh4h8nt9mrd2v
You can specify X-Newest: true on GETs and HEADs to indicate you want Swift to query all backend copies and return the newest version retrieved.
Object COPY requests now always copy the newest object they can find.
Object POSTs are implemented as COPYs now by default (you can revert to previous implementation with conf object_post_as_copy = false)
Account and container GETs and HEADs now shuffle the nodes they use to balance load.

Show diffs side-by-side

added added

removed removed

Lines of Context:
623
623
            file.keep_cache = True
624
624
        if 'Content-Encoding' in file.metadata:
625
625
            response.content_encoding = file.metadata['Content-Encoding']
 
626
        response.headers['X-Timestamp'] = file.metadata['X-Timestamp']
626
627
        return request.get_response(response)
627
628
 
628
629
    def HEAD(self, request):
657
658
        response.content_length = file_size
658
659
        if 'Content-Encoding' in file.metadata:
659
660
            response.content_encoding = file.metadata['Content-Encoding']
 
661
        response.headers['X-Timestamp'] = file.metadata['X-Timestamp']
660
662
        return response
661
663
 
662
664
    def DELETE(self, request):