if (isImageRequest(request) && isFilter()) {
HttpServletResponse response = (HttpServletResponse) res;
ImageResponseWrapper wrappedResponse = new ImageResponseWrapper(response, getImageType(request));
chain.doFilter(req, wrappedResponse);
wrappedResponse.finishResponse();
return;
}
chain.doFilter(req, res);
}