hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Truncated content-length delimited message bodies with sendfile
Date Wed, 27 Feb 2013 13:51:39 GMT
On Wed, 2013-02-27 at 18:28 +0530, Asankha C. Perera wrote:
> Hi Oleg
> >> I would try reading into a ByteBuffer with zero remaining capacity.
> >> Hopefully this would give us channel status without moving any data into
> >> the buffer.
> > Thats a great idea.. I'll try that, and maybe we could incorporate 
> > that into the trunk later
> Unfortunately this didn't work .. I guess one must really try to read at 
> least one byte to detect the end. We could use a one byte ByteBuffer to 
> read just one byte, and if one was read, transfer that to the session 
> buffer, but I doubt if that would actually give any benefit
> 

Then there appears to be no way around attempting a read into the
session buffer and having to deal with the case of some content actually
ending up in the buffer.

Oleg 



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


Mime
View raw message