This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 801e4bd597a34054788c1ea43ae8441235f92e21 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 bfd3f6f56b..cb329b10f0 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -177,6 +177,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 @@ -210,6 +212,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 4521e6c419..61c67f700d 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -133,6 +133,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