tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 63949] ERR_INCOMPLETE_CHUNKED_ENCODING errors when using NIO Connector with HTTPS
Date Fri, 22 Nov 2019 10:33:51 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=63949

--- Comment #2 from Remy Maucherat <remm@apache.org> ---
The previous code was using a write loop, that's the only difference I can see
and you can try it.
Such as:
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1273,9 +1273,13 @@
                 // registered for write once as both container and user code
can trigger
                 // write registration.
             } else {
-                if (socket.write(from) == -1) {
-                    throw new EOFException();
-                }
+                int n = 0;
+                do {
+                    n = socket.write(from);
+                    if (n == -1) {
+                        throw new EOFException();
+                    }
+                } while (n > 0 && from.hasRemaining());
             }
             updateLastWrite();
         }

If you are still experiencing an issue, please provide a test case (there's an
extensive non blocking write test in the Tomcat testsuite, which is not
failing).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message