tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39417] - ApplicationDispatcher.unwrapRequest() should not assume request is an extension of ServletRequestWrapper
Date Sun, 21 Oct 2007 23:34:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39417>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39417





------- Additional Comments From mailmur@yahoo.com  2007-10-21 16:34 -------
I made a quick test, and this works fine. My "requestDispatcher.forward(offReq,
offRes)" call went to the target webapp and reply written to the logfile. No
more ClassCastException.

[ org.apache.catalina.core.ApplicationDispatcher.java ]
  private void unwrapRequest(State state) {
    ...
      // FIX: avoid ClassCast exception if current one is ServletRequest
      // but not ServletRequestWrapper.
      if (!(current instanceof ServletRequestWrapper))
        break;

      // Advance to the next request in the chain
      previous = current;
      current = ((ServletRequestWrapper) current).getRequest();
    }
  }

  private void unwrapResponse(State state) {
    ...
      // FIX: avoid ClassCast exception if current one is ServletResponse
      // but not ServletResponseWrapper.
      if (!(current instanceof ServletResponseWrapper))
               break;

      // Advance to the next response in the chain
      previous = current;
      current = ((ServletResponseWrapper) current).getResponse();
    }
  }


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message