swift/proxy/controllers/obj.py
def end_of_object_data(self, footer_metadata=None):
        """
        Call when there is no more data to send.

        Overrides superclass implementation to send any footer metadata
        after object data.

        :param footer_metadata: dictionary of metadata items
                                to be sent as footers.
        """
        if self.state == DATA_SENT:
            raise ValueError("called end_of_object_data twice")
        elif self.state == NO_DATA_SENT and self.mime_boundary:
            self._start_object_data()

        footer_body = json.dumps(footer_metadata)
        footer_md5 = md5(footer_body).hexdigest()

        tail_boundary = ("--%s" % (self.mime_boundary,))
        if not self.multiphase:
            # this will be the last part sent
            tail_boundary = tail_boundary + "--"

        message_parts = [
            ("\r\n--%s\r\n" % self.mime_boundary),
            "X-Document: object metadata\r\n",
            "Content-MD5: %s\r\n" % footer_md5,
            "\r\n",
            footer_body, "\r\n",
            tail_boundary, "\r\n",
        ]
        self.queue.put("".join(message_parts))

        self.queue.put('')
        self.state = DATA_SENT

        Call when there is no more data to send.

        Overrides superclass implementation to send any footer metadata
        after object data.

        :param footer_metadata: dictionary of metadata items
                                to be sent as footers.
        
Call when there is no more data to send.
Overrides superclass implementation to send any footer metadata
after object data.
Call when there is no more data to send . Overrides superclass implementation to send any footer metadata after object data .
def end_of_object_data(self, footer_metadata=None):
        if self.state == DATA_SENT:
            raise ValueError("called end_of_object_data twice")
        elif self.state == NO_DATA_SENT and self.mime_boundary:
            self._start_object_data()
        footer_body = json.dumps(footer_metadata)
        footer_md5 = md5(footer_body).hexdigest()
        tail_boundary = ("--%s" % (self.mime_boundary,))
        if not self.multiphase:
            tail_boundary = tail_boundary + "--"
        message_parts = [
            ("\r\n--%s\r\n" % self.mime_boundary),
            "X-Document: object metadata\r\n",
            "Content-MD5: %s\r\n" % footer_md5,
            "\r\n",
            footer_body, "\r\n",
            tail_boundary, "\r\n",
        ]
        self.queue.put("".join(message_parts))
        self.queue.put('')
        self.state = DATA_SENT
def end_of_object_data ( self , footer_metadata = None ) : if self . state == DATA_SENT : raise ValueError ( "called end_of_object_data twice" ) elif self . state == NO_DATA_SENT and self . mime_boundary : self . _start_object_data ( ) footer_body = json . dumps ( footer_metadata ) footer_md5 = md5 ( footer_body ) . hexdigest ( ) tail_boundary = ( "--%s" % ( self . mime_boundary , ) ) if not self . multiphase : tail_boundary = tail_boundary + "--" message_parts = [ ( "\r\n--%s\r\n" % self . mime_boundary ) , "X-Document: object metadata\r\n" , "Content-MD5: %s\r\n" % footer_md5 , "\r\n" , footer_body , "\r\n" , tail_boundary , "\r\n" , ] self . queue . put ( "" . join ( message_parts ) ) self . queue . put ( '' ) self . state = DATA_SENT
Call when there is no more data to send.
Call when there is no more data to send .
"""
        Call when there is no more data to send.

        Overrides superclass implementation to send any footer metadata
        after object data.

        :param footer_metadata: dictionary of metadata items
                                to be sent as footers.
        """ # this will be the last part sent
self
footer_metadata
dictionary of metadata items
to be sent as footers.
dictionary of metadata items to be sent as footers .