This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 eed48cf61b Ensure non-blocking write buffer is empty before sending
AJP end msg
eed48cf61b is described below
commit eed48cf61b595cf9b7993ea85e6128e94a4e22e8
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 2cba43d214..8af9074609 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -1075,6 +1075,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 1ee723021d..2b7eb24483 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: [email protected]
For additional commands, e-mail: [email protected]