'HTTP PUT request handler.'

@public
def PUT(self, req):

    if (not self.app.allow_account_management):
        return HTTPMethodNotAllowed(request=req, headers={'Allow': ',    '.join(self.allowed_methods)})
    error_response = check_metadata(req, 'account')
    if error_response:
        return error_response
    if (len(self.account_name) > constraints.MAX_ACCOUNT_NAME_LENGTH):
        resp = HTTPBadRequest(request=req)
        resp.body = ('Account    name    length    of    %d    longer    than    %d' % (len(self.account_name), constraints.MAX_ACCOUNT_NAME_LENGTH))
        return resp
    (account_partition, accounts) = self.app.account_ring.get_nodes(self.account_name)
    headers = self.generate_request_headers(req, transfer=True)
    clear_info_cache(self.app, req.environ, self.account_name)
    resp = self.make_requests(req, self.app.account_ring, account_partition, 'PUT', req.swift_entity_path, ([headers] * len(accounts)))
    self.add_acls_from_sys_metadata(resp)
    return resp
