- Fix classcast exceptions if Comet is used and there's a filter (I forgot to commit...
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 19 Jul 2007 23:48:06 +0000 (23:48 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 19 Jul 2007 23:48:06 +0000 (23:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@557818 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardWrapperValve.java

index 5f3934f..2c75dfc 100644 (file)
@@ -55,7 +55,7 @@ final class StandardWrapperValve
 
 
     // Some JMX statistics. This vavle is associated with a StandardWrapper.
-    // We exponse the StandardWrapper as JMX ( j2eeType=Servlet ). The fields
+    // We expose the StandardWrapper as JMX ( j2eeType=Servlet ). The fields
     // are here for performance.
     private volatile long processingTime;
     private volatile long maxTime;
@@ -162,9 +162,10 @@ final class StandardWrapperValve
         if (servlet instanceof CometProcessor 
                 && request.getAttribute("org.apache.tomcat.comet.support") == Boolean.TRUE) {
             comet = true;
+            request.setComet(true);
         }
         
-        // Acknowlege the request
+        // Acknowledge the request
         try {
             response.sendAcknowledgement();
         } catch (IOException e) {
@@ -195,6 +196,8 @@ final class StandardWrapperValve
             ApplicationFilterFactory.getInstance();
         ApplicationFilterChain filterChain =
             factory.createFilterChain(request, wrapper, servlet);
+        // Reset comet flag value after creating the filter chain
+        request.setComet(false);
 
         // Call the filter chain for this request
         // NOTE: This also calls the servlet's service() method