LPS-44383 Lowercase only when doing the check, because otherwise the URL we are building would have the contextPath in lowercase and this could create issues in some application servers