https://bz.apache.org/bugzilla/show_bug.cgi?id=66076
--- Comment #2 from Phil Clay <pil...@yahoo.com> ---
After a bit of investigation, my rudimentary understanding is that 

1) a buffer of unencrypted data makes it down to SecureNioChannel.write

https://github.com/apache/tomcat/blob/93108de1127fb228e343a3f3304554bfe7177583/java/org/apache/tomcat/util/net/SecureNioChannel.java#L786


2) SecureNioChannel.write encrypts it into a new buffer (netOutBuffer)

https://github.com/apache/tomcat/blob/93108de1127fb228e343a3f3304554bfe7177583/java/org/apache/tomcat/util/net/SecureNioChannel.java#L810

3) And then flushes that encrypted buffer

https://github.com/apache/tomcat/blob/93108de1127fb228e343a3f3304554bfe7177583/java/org/apache/tomcat/util/net/SecureNioChannel.java#L824


4) But flush is not guaranteed to write all the encrypted bytes to the channel,
and returns false if the buffer was not completely emptied...

https://github.com/apache/tomcat/blob/93108de1127fb228e343a3f3304554bfe7177583/java/org/apache/tomcat/util/net/SecureNioChannel.java#L120-L127

But the return value is ignored, and there's no subsequent re-flush until the
next write.

Therefore, the unwritten encrypted data remains in the netOutBuffer.

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

Reply via email to