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

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


The following commit(s) were added to refs/heads/main by this push:
     new 7a8da75d93 Ensure non-blocking write buffer is empty before sending 
AJP end msg
7a8da75d93 is described below

commit 7a8da75d9367cb1502040920f24fbafacf3a5a00
Author: Mark Thomas <[email protected]>
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 8f8f45abe6..5b88662683 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -1057,6 +1057,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 8395a38545..7caeb4bdb0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -345,6 +345,10 @@
         content-length bytes to the response, allow that write to complete in a
         non-blocking manner before the response is closed. (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="Jasper">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to