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 2026/09/29 17:45:06 UTC

(tomcat) branch 9.0.x updated: Ensure non-blocking write buffer is empty before sending AJP end msg

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

markt-asf 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 65aba2d475 Ensure non-blocking write buffer is empty before sending AJP end msg
65aba2d475 is described below

commit 65aba2d475a387fbd6ea67128ce3c3f14e9085b7
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Sep 29 18:33:08 2026 +0100

    Ensure non-blocking write buffer is empty before sending AJP end msg
---
 java/org/apache/coyote/ajp/AjpProcessor.java | 3 +++
 webapps/docs/changelog.xml                   | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java b/java/org/apache/coyote/ajp/AjpProcessor.java
index a4813cad6c..90bac3d6fc 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -1080,6 +1080,9 @@ public class AjpProcessor extends AbstractProcessor {
             return;
         }
 
+        // Make sure the non-blocking write buffer is empty before sending the end message.
+        socketWrapper.flush(true);
+
         if (getErrorState().isError()) {
             // Write the end and close message
             socketWrapper.write(true, endAndCloseMessageArray, 0, endAndCloseMessageArray.length);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 426cfefeb6..2eb3f14649 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -158,6 +158,10 @@
         Fix a timing issue that could cause large non-blocking writes to stall
         for AJP connections. (markt)
       </fix>
+      <fix>
+        Ensure that the non-blocking write buffer is empty before sending an AJP
+        end response message. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org