You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2007/03/30 16:38:12 UTC
svn commit: r524103 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina:
connector/CoyoteAdapter.java core/ApplicationFilterFactory.java
core/StandardWrapperValve.java
Author: remm
Date: Fri Mar 30 07:38:02 2007
New Revision: 524103
URL: http://svn.apache.org/viewvc?view=rev&rev=524103
Log:
- Adjustments to error processing with Comet during the begin event (exceptions not causing error reports).
- Fix a probable bug when security was enabled (Comet would most likely not work).
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperValve.java
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?view=diff&rev=524103&r1=524102&r2=524103
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Fri Mar 30 07:38:02 2007
@@ -216,7 +216,7 @@
connector.getContainer().getPipeline().getFirst().invoke(request, response);
if (request.isComet()) {
- if (!response.isClosed()) {
+ if (!response.isClosed() && !response.isError()) {
comet = true;
res.action(ActionCode.ACTION_COMET_BEGIN, null);
} else {
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java?view=diff&rev=524103&r1=524102&r2=524103
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java Fri Mar 30 07:38:02 2007
@@ -121,16 +121,21 @@
// Create and initialize a filter chain object
ApplicationFilterChain filterChain = null;
- if (!Globals.IS_SECURITY_ENABLED && (request instanceof Request)) {
+ if (request instanceof Request) {
Request req = (Request) request;
- filterChain = (ApplicationFilterChain) req.getFilterChain();
- if (filterChain == null) {
+ if (Globals.IS_SECURITY_ENABLED) {
+ // Security: Do not recycle
filterChain = new ApplicationFilterChain();
- req.setFilterChain(filterChain);
+ } else {
+ filterChain = (ApplicationFilterChain) req.getFilterChain();
+ if (filterChain == null) {
+ filterChain = new ApplicationFilterChain();
+ req.setFilterChain(filterChain);
+ }
}
comet = req.isComet();
} else {
- // Security: Do not recycle
+ // Request dispatcher in use
filterChain = new ApplicationFilterChain();
}
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperValve.java?view=diff&rev=524103&r1=524102&r2=524103
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperValve.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperValve.java Fri Mar 30 07:38:02 2007
@@ -159,9 +159,10 @@
}
// Identify if the request is Comet related now that the servlet has been allocated
+ boolean comet = false;
if (servlet instanceof CometProcessor
&& request.getAttribute("org.apache.tomcat.comet.support") == Boolean.TRUE) {
- request.setComet(true);
+ comet = true;
}
// Acknowlege the request
@@ -209,8 +210,9 @@
if (context.getSwallowOutput()) {
try {
SystemLogHandler.startCapture();
- if (request.isComet()) {
+ if (comet) {
filterChain.doFilterEvent(request.getEvent());
+ request.setComet(true);
} else {
filterChain.doFilter(request.getRequest(),
response.getResponse());
@@ -222,8 +224,9 @@
}
}
} else {
- if (request.isComet()) {
+ if (comet) {
filterChain.doFilterEvent(request.getEvent());
+ request.setComet(true);
} else {
filterChain.doFilter
(request.getRequest(), response.getResponse());
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org