You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Julien Coloos (JIRA)" <ji...@apache.org> on 2019/03/26 16:54:00 UTC
[jira] [Commented] (HTTPCORE-573) FileContentDecoder don't always
enforce the maximum number of bytes to transfer
[ https://issues.apache.org/jira/browse/HTTPCORE-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801937#comment-16801937 ]
Julien Coloos commented on HTTPCORE-573:
----------------------------------------
Small patch to take into account 'count' when reading data from the internal buffer.
> FileContentDecoder don't always enforce the maximum number of bytes to transfer
> -------------------------------------------------------------------------------
>
> Key: HTTPCORE-573
> URL: https://issues.apache.org/jira/browse/HTTPCORE-573
> Project: HttpComponents HttpCore
> Issue Type: Bug
> Components: HttpCore NIO
> Affects Versions: 4.4.11
> Reporter: Julien Coloos
> Priority: Trivial
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The FileContentDecoder.transfer function has the 'count' parameter indicating the maximum number of bytes to transfer.
> Implementations (LengthDelimitedDecoder and IdentityDecoder) don't respect this parameter when getting the data from the internal buffer: in practice the whole buffer content is transferred, thus the actual number of bytes transferred may exceed the maximum requested by caller.
> Since the way data are read from the buffer can be limited, it is possible to respect the requested 'count'.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org