From 2fdab0edc2a44c0dc9d0c161eb0e1f9c08d42e0b Mon Sep 17 00:00:00 2001 From: remm Date: Thu, 19 Jul 2007 23:48:06 +0000 Subject: [PATCH] - Fix classcast exceptions if Comet is used and there's a filter (I forgot to commit this patch). 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/core/StandardWrapperValve.java b/java/org/apache/catalina/core/StandardWrapperValve.java index 5f3934f07..2c75dfc1a 100644 --- a/java/org/apache/catalina/core/StandardWrapperValve.java +++ b/java/org/apache/catalina/core/StandardWrapperValve.java @@ -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 -- 2.11.0