You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2006/12/31 01:32:48 UTC

svn commit: r491354 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

Author: markt
Date: Sat Dec 30 16:32:47 2006
New Revision: 491354

URL: http://svn.apache.org/viewvc?view=rev&rev=491354
Log:
Port Filip's improvement to the fix for bug 34956 from TC6.

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java?view=diff&rev=491354&r1=491353&r2=491354
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java Sat Dec 30 16:32:47 2006
@@ -972,6 +972,14 @@
         boolean same = false;
         ServletRequest dispatchedRequest = appRequest;
         
+        //find the request that was passed into the service method
+        while (originalRequest instanceof ServletRequestWrapper &&
+                ((ServletRequestWrapper) originalRequest).getRequest()!=null) {
+            originalRequest =
+                ((ServletRequestWrapper) originalRequest).getRequest();
+        }
+
+        //compare with the dispatched request
         while (!same) {
             if (originalRequest.equals(dispatchedRequest)) {
                 same = true;
@@ -991,6 +999,15 @@
         same = false;
         ServletResponse dispatchedResponse = appResponse;
         
+        //find the response that was passed into the service method
+        while (originalResponse instanceof ServletResponseWrapper &&
+                ((ServletResponseWrapper) originalResponse).getResponse() !=
+                    null) {
+            originalResponse =
+                ((ServletResponseWrapper) originalResponse).getResponse();
+        }
+
+        //compare with the dispatched response
         while (!same) {
             if (originalResponse.equals(dispatchedResponse)) {
                 same = true;



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