Fix issue where HEAD endpoints are rejected.