hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-92) NIO ChunkEncoder does not flush the session output buffer
Date Sun, 02 Mar 2008 19:58:50 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574247#action_12574247
] 

Oleg Kalnichevski commented on HTTPCORE-92:
-------------------------------------------

Pretty close, but there is a subtle bug in the code still 

+        if (avail < chunk) {
+            // write no more than 'avail' bytes
+            this.buffer.write((ByteBuffer)src.limit(avail));

Do not you think you some data in the source buffer gets lost unless the buffer's limit is
reset to its original value? Try to extend the second test case to save all data from the
source buffer to the content encode and see what happens.

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: fix2_92.patch, fix3_92.patch, possiblefix_92.patch, 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message