

@_handle_container_not_found
def copy_object(self, container, obj, new_container, new_obj_name=None, content_type=None):
    "\n        Copies the object to the new container, optionally giving it a new name.\n        If you copy to the same container, you must supply a different name.\n\n        Returns the etag of the newly-copied object.\n\n        You can optionally change the content_type of the object by supplying\n        that in the 'content_type' parameter.\n        "
    nm = (new_obj_name or utils.get_name(obj))
    uri = ('/%s/%s' % (utils.get_name(new_container), nm))
    copy_from = ('/%s/%s' % (utils.get_name(container), utils.get_name(obj)))
    headers = {
        'X-Copy-From': copy_from,
        'Content-Length': '0',
    }
    if content_type:
        headers['Content-Type'] = content_type
    (resp, resp_body) = self.api.method_put(uri, headers=copy_from)
    return resp.headers.get('etag')

dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py ContainerManager.copy_object/VarMisuse@126/313 `headers`->`copy_from`