Pretty sure you meant `request.method == "HEAD"` here.