This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 889466af8a Fix BZ 68559 - allow async error handling to write to
response
889466af8a is described below
commit 889466af8af224db30c73f4c886f0e15612f38b9
Author: Mark Thomas <[email protected]>
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 a64563425d..157b88f9e7 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 2a6b38f9d5..1578011215 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,6 +126,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: [email protected]
For additional commands, e-mail: [email protected]