This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 9670865dac Fix BZ 68559 - allow async error handling to write to response 9670865dac is described below commit 9670865dac0b39a350ccd266332712cdf70ede34 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Feb 8 11:32:48 2024 +0000 Fix BZ 68559 - allow async error handling to write to response https://bz.apache.org/bugzilla/show_bug.cgi?id=68559 --- java/org/apache/catalina/connector/CoyoteAdapter.java | 4 ++++ webapps/docs/changelog.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java index c88bdce317..49ddf7c8c1 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -179,6 +179,8 @@ public class CoyoteAdapter implements Adapter { } } catch (Throwable t) { ExceptionUtils.handleThrowable(t); + // Allow the error handling to write to the response + response.setSuspended(false); // Need to trigger the call to AbstractProcessor.setErrorState() // before the listener is called so the listener can call complete // Therefore no need to set success=false as that would trigger a @@ -212,6 +214,8 @@ public class CoyoteAdapter implements Adapter { } } catch (Throwable t) { ExceptionUtils.handleThrowable(t); + // Allow the error handling to write to the response + response.setSuspended(false); // Need to trigger the call to AbstractProcessor.setErrorState() // before the listener is called so the listener can call complete // Therefore no need to set success=false as that would trigger a diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 8e2522ef5b..1390508baf 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -120,6 +120,10 @@ Review usage of debug logging and downgrade trace or data dumping operations from debug level to trace. (remm) </fix> + <fix> + <bug>68559</bug>: Allow asynchronous error handling to write to the + response after an error during asynchronous processing. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org