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

markt 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 c2da55fd51 Fix BZ 69982 Flush final block of TLS response payload
c2da55fd51 is described below

commit c2da55fd518491b143ed544817bd9f6c8f32a2bb
Author: Phil Clay <[email protected]>
AuthorDate: Fri Mar 20 09:23:16 2026 -0600

    Fix BZ 69982 Flush final block of TLS response payload
    
    https://bz.apache.org/bugzilla/show_bug.cgi?id=69982
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index 93af98040f..b946efd554 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1379,6 +1379,25 @@ public class NioEndpoint extends 
AbstractNetworkChannelEndpoint<NioChannel,Socke
             return !socketBufferHandler.isWriteBufferEmpty() || 
getSocket().getOutboundRemaining() > 0;
         }
 
+        /*
+         * https://bz.apache.org/bugzilla/show_bug.cgi?id=69982
+         *
+         * Similar to socketOrNetworkBufferHasDataLeft(), check the additional 
buffer for TLS
+         */
+        @Override
+        public boolean hasDataToWrite() {
+            return super.hasDataToWrite() || 
getSocket().getOutboundRemaining() > 0;
+        }
+
+        /*
+         * https://bz.apache.org/bugzilla/show_bug.cgi?id=69982
+         *
+         * Similar to socketOrNetworkBufferHasDataLeft(), check the additional 
buffer for TLS
+         */
+        @Override
+        public boolean canWrite() {
+            return super.canWrite() && getSocket().getOutboundRemaining() == 0;
+        }
 
         @Override
         protected void doWrite(boolean block, ByteBuffer buffer) throws 
IOException {


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

Reply via email to