openstack swift object put request

asked 2014-02-02 03:49:55 -0500

pragya jain gravatar image

updated 2014-08-19 11:12:13 -0500

briancline gravatar image

hi all,

according to my understanding of openstack swift object put request flow path, the request first goes to the proxy server, then proxy server forward the request to ObjectController defined in Here is some portion of lines of code of ObjectController.PUT() in

def PUT(self, req):
        """HTTP PUT request handler."""
# do a HEAD request for container sync and checking object versions
if 'x-timestamp' in req.headers or \
                (object_versions and not
            hreq = Request.blank(req.path_info, headers={'X-Newest': 'True'},
                                 environ={'REQUEST_METHOD': 'HEAD'})
            hresp = self.GETorHEAD_base(
                hreq, _('Object'),, partition,

in the following lines of code, self.GETorHEAD_base() create an HTTPConnection to object server for a HEAD request which is defined in ObjectController.HEAD() of HEAD request retrieve the metadata of the object

My question is:

AT these lines of code, we are in process of writting an object, object is not written till yet on the node, then what will it return to hresp?

thanks in advance Pragya Jain

edit retag flag offensive close merge delete