tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r491354 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
Date Sun, 31 Dec 2006 00:32:48 GMT
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


Mime
View raw message