'Put an object
:param name: The object name
:param content: A file object
:raise: `SwiftException` if unable to create'

def put_object(self, name, content):

    content.seek(0)
    data = content.read()
    path = ((self.base_path + '/') + name)
    headers = {'Content-Length': str(len(data))}
    def _send():
        ret = self.httpclient.request('PUT', path, body=data, headers=headers)
        return ret
    try:
        ret = _send()
    except Exception:
        ret = _send()
    if ((ret.status_code < 200) or (ret.status_code > 300)):
        raise SwiftException(('PUT    request    failed    with    error    code    %s' % ret.status_code))
