def find_request_end_token(data):
    """Find token that indicates that request is over."""
    lines = data.splitlines(True)
    if not lines:
        return False
    elif 'command_list_ok_begin' == lines[0].strip():
        return 'command_list_end' == lines[-1].strip()
    else:
        return lines[0].endswith('\n')