if (StringUtils.isEmpty(consumedUri)) {
log.error("No part of the received URI " + requestURI + " has been consumed. Trying to serve it as good as possible.");
}
else if (requestURI.startsWith(consumedUri)) {
String uriToForward = requestURI.substring(consumedUri.length());
setResponse(new RedirectToURLResponse(uriToForward, !uriToForward.startsWith(request.getRequestObject().getContextPath())));
log.debug("Redirecting to static URI: " + uriToForward);
}
else {
log.error("Consumed URI " + consumedUri + " is not even part of request URI: " + requestURI +
". Trying to serve it as good as possible.");