"""A page that echoes the Referrer header value via BroadcastChannel. """ def main(request, response): referrer = request.headers.get(b"referer") uid = request.GET.first(b"uid") if referrer is None: referrer = b"(none)" html = u'''