You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2021/11/04 13:48:37 UTC

[GitHub] [httpcomponents-core] ok2c commented on a change in pull request #317: Remove a check if inPlainBuf has remaining capacity prior to writing …

ok2c commented on a change in pull request #317:
URL: https://github.com/apache/httpcomponents-core/pull/317#discussion_r742850980



##########
File path: httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
##########
@@ -588,14 +588,14 @@ private void decryptData(final IOSession protocolSession) throws IOException {
                         if (sslEngine.isInboundDone()) {
                             endOfStream = true;
                         }
-                        if (inPlainBuf.hasRemaining()) {

Review comment:
       @JasonMathison Oh, damn. This check should have been `inPlainBuf.position() > 0`. The idea is to avoid doing the buffer flip and a useless input event with an empty buffer. Could you please test code with this change and let me know if everything still works as expected?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org