This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new ee3e233dc6 Fix BZ 68559 - allow async error handling to write to 
response
ee3e233dc6 is described below

commit ee3e233dc68521111eca84572d821bd21d2781ef
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 943496e0f9..c3a0dc2506 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 c9c87206cd..01a21ef39a 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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to