protected ServletResponse wrapServletResponse(HttpServletResponse orig, ShiroHttpServletRequest request) {
        return new ShiroHttpServletResponse(orig, getServletContext(), request);
    }
Returns a new {@link ShiroHttpServletResponse} instance, wrapping the {@code orig} argument, in order to provide
correct URL rewriting behavior required by the Servlet Specification when using Shiro-based sessions (and not
Servlet Container HTTP-based sessions).

@param orig    the original {@code HttpServletResponse} instance provided by the Servlet Container.
@param request the {@code ShiroHttpServletRequest} instance wrapping the original request.
@return the wrapped ServletResponse instance to use during {@link FilterChain} execution.
@since 1.0
web/src/main/java/org/apache/shiro/web/servlet/AbstractShiroFilter.java