You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Sam Berlin <sb...@gmail.com> on 2008/06/09 18:34:08 UTC

FileContentDecoder.transfer

I'm fairly certain there's a bug IdentityDecoder &
LengthDelimitedDecoder.transfer(FileChannel, position, count).  If
SessionInputBuffer.hasData() returns true, then an attempt is made to
read from the SessionInputBuffer into the FileChannel, but the
FileChannel is not positioned correctly beforehand, so the data will
be written to an arbitrary location.

I'll write up a test shortly to confirm this, but wanted to send an
email incase anyone can tell me I'm nuts and reading it wrong.

Sam

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


Re: FileContentDecoder.transfer

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2008-06-09 at 12:34 -0400, Sam Berlin wrote:
> I'm fairly certain there's a bug IdentityDecoder &
> LengthDelimitedDecoder.transfer(FileChannel, position, count).  If
> SessionInputBuffer.hasData() returns true, then an attempt is made to
> read from the SessionInputBuffer into the FileChannel, but the
> FileChannel is not positioned correctly beforehand, so the data will
> be written to an arbitrary location.
> 
> I'll write up a test shortly to confirm this, but wanted to send an
> email incase anyone can tell me I'm nuts and reading it wrong.
> 
> Sam
> 

Yep. Looks like a bug

Oleg

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


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