def METHOD_NAME(request, name):
    authorized = request.user.is_authenticated
    mirror = get_object_or_404(Mirror, name=name)
    if not authorized and (not mirror.public or not mirror.active):
        raise Http404
    status_info = get_mirror_statuses(mirror_id=mirror.id, show_all=authorized)
    data = status_info.copy()
    data['version'] = 5
    data['tier'] = mirror.tier
    if mirror.upstream:
        data['upstream'] = mirror.upstream.name
    data['details'] = mirror.get_full_url()
    if authorized and request.user.has_perm('mirrors.change_mirror'):
        data['admin_email'] = mirror.admin_email
        data['alternate_email'] = mirror.alternate_email
    to_json = json.dumps(data, ensure_ascii=False, cls=ExtendedMirrorStatusJSONEncoder)
    response = HttpResponse(to_json, content_type='application/json')
    return response