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

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

commit 557b1b59306f67c22cca26e8c691ba7b57a77f4b
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