'Sends a PUT subrequest for the url_path using the source df
(DiskFile) and content_length.'

def send_put(self, url_path, df):

    msg = [('PUT    ' + url_path), ('Content-Length:    ' + str(df.content_length))]
    for (key, value) in sorted(df.get_datafile_metadata().items()):
        if (key not in ('name', 'Content-Length')):
            msg.append(('%s:    %s' % (key, value)))
    msg = ('\r\n'.join(msg) + '\r\n\r\n')
    with exceptions.MessageTimeout(self.daemon.node_timeout, 'send_put'):
        self.connection.send(('%x\r\n%s\r\n' % (len(msg), msg)))
    bytes_read = 0
    for chunk in df.reader():
        bytes_read += len(chunk)
        with exceptions.MessageTimeout(self.daemon.node_timeout, 'send_put    chunk'):
            self.connection.send(('%x\r\n%s\r\n' % (len(chunk), chunk)))
    if (bytes_read != df.content_length):
        raise exceptions.ReplicationException('Sent    data    length    does    not    match    content-length')
