/** Helper method that performs CITE tests mandatory validations. */ private static void performCiteValidation(HttpServletRequest request) throws OWSException { // paths validation are not done for WMTS REST API if (isRestRequest(request)) { return; } // base path should end with WMTS String basePath = request.getPathInfo(); String[] paths = basePath.split("/"); String lastPath = paths[paths.length - 1]; if (!lastPath.equalsIgnoreCase("WMTS")) { // invalid base path, not found should be returned throw new OWSException( 404, "NoApplicableCode", "request", "Service or request not found"); } // service query parameter is mandatory and should be equal to WMTS validateWmtsServiceName("wmts", request); }
boolean isRestRequest = isRestRequest(request);