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 2015/04/01 14:52:24 UTC
svn commit: r1670631 -
/tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
Author: markt
Date: Wed Apr 1 12:52:24 2015
New Revision: 1670631
URL: http://svn.apache.org/r1670631
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57779
Dispatch to another thread for error handling is only intended to be used during Servlet 3+ async processing. Don't dispatch if the user is doing their own, custom form of async.
Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java?rev=1670631&r1=1670630&r2=1670631&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java Wed Apr 1 12:52:24 2015
@@ -78,11 +78,12 @@ public abstract class AbstractProcessor
protected void setErrorState(ErrorState errorState, Throwable t) {
boolean blockIo = this.errorState.isIoAllowed() && !errorState.isIoAllowed();
this.errorState = this.errorState.getMostSevere(errorState);
- if (blockIo && !ContainerThreadMarker.isContainerThread()) {
- // The error occurred on a non-container thread which means not all
- // of the necessary clean-up will have been completed. Dispatch to
- // a container thread to do the clean-up. Need to do it this way to
- // ensure that all the necessary clean-up is performed.
+ if (blockIo && !ContainerThreadMarker.isContainerThread() && isAsync()) {
+ // The error occurred on a non-container thread during async
+ // processing which means not all of the necessary clean-up will
+ // have been completed. Dispatch to a container thread to do the
+ // clean-up. Need to do it this way to ensure that all the necessary
+ // clean-up is performed.
if (response.getStatus() < 400) {
response.setStatus(500);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org