@SuppressWarnings({"UnusedDeclaration"})
    protected ServletRequest prepareServletRequest(ServletRequest request, ServletResponse response, FilterChain chain) {
        ServletRequest toUse = request;
        if (request instanceof HttpServletRequest) {
            HttpServletRequest http = (HttpServletRequest) request;
            toUse = wrapServletRequest(http);
        }
        return toUse;
    }
Prepares the {@code ServletRequest} instance that will be passed to the {@code FilterChain} for request
processing.
<p/>
If the {@code ServletRequest} is an instance of {@link HttpServletRequest}, the value returned from this method
is obtained by calling {@link #wrapServletRequest(javax.servlet.http.HttpServletRequest)} to allow Shiro-specific
HTTP behavior, otherwise the original {@code ServletRequest} argument is returned.

@param request  the incoming ServletRequest
@param response the outgoing ServletResponse
@param chain    the Servlet Container provided {@code FilterChain} that will receive the returned request.
@return the {@code ServletRequest} instance that will be passed to the {@code FilterChain} for request processing.
@since 1.0
web/src/main/java/org/apache/shiro/web/servlet/AbstractShiroFilter.java