[
https://issues.apache.org/jira/browse/HTTPCORE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571443#action_12571443
]
Oleg Kalnichevski commented on HTTPCORE-92:
-------------------------------------------
Andrea,
Probably that was not quite clear from the issue description. The main goal is
to prevent the session buffer from growing needlessly. There is point in trying
to copy every single byte from one buffer into another. NIO channels were
primarily designed to enable the I/O layer to transfer only as much data as
possible without blocking or allocating additional memory. So, instead of
expanding the session buffer to accommodate the complete content of the source
buffer, the ChunkEncoder should flush session buffer and copy only as much data
from the source buffer the session buffer is capable of holding without having
to expand its capacity. That is it.
Please submit changes in the udiff (unified diff) format. This will make my
life a little easier.
Oleg
> NIO ChunkEncoder does not flush the session output buffer
> ---------------------------------------------------------
>
> Key: HTTPCORE-92
> URL: https://issues.apache.org/jira/browse/HTTPCORE-92
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Fix For: 4.0-beta2
>
> Attachments: write_reworked.txt
>
>
> Present implementation of the NIO ChunkEncoder is over-simplistic. It always
> expands the session output buffer to store more content instead of trying to
> free up space by flushing the buffered content.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]