class SessionHelpers {

  public ServletResponse prepareResponse(ServletRequest request, ServletResponse response) {
    if (request instanceof HttpRequestWrapper) {
      return ((HttpRequestWrapper)request).getResponse();
    }
    return response;
  }

}