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

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


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

commit beaa810aafdcb793866a58d896c5b60f0641e004
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 5878c0bdb5..d33b076b90 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -1059,6 +1059,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 b047a87a8c..26ea0249b0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -4485,6 +4485,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