hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan evans <dev...@voxeo.com>
Subject Re: Large Chunk Extension
Date Fri, 01 Jul 2011 22:05:41 GMT
Oleg,

I did as you suggested and modified TestChunkCoding.java to force the situation.  The test
ran correctly.  Sorry for the noise, but thanks for pointing me to the tests.

Dan

On Jul 1, 2011, at 3:23 PM, Oleg Kalnichevski wrote:

> On Fri, 2011-07-01 at 14:43 -0400, dan evans wrote:
>> httpcore-4.1.1 - In ChunkedInputStream, the CharArrayBuffer allocated to read chunk
metadata has a length of 16.  In looking at AbstractSessionInputBuffer, it seems that if the
chunk has an optional "chunk extension" that exceeds this length (i.e. locateLF() returns
-1), either the stream will get a false EOF or the first part of the metadata will be overwritten.
 This is just a hypothesis from staring at the code.  I have never seen chunk metadata this
long, nor have I been able to actually test this.
>> 
>> dan
>> 
> 
> Dan
> 
> CharArrayBuffer should get automatically expanded in order to fit in a
> complete line. There should be a test case for that in the HttpCore test
> suite
> 
> http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java
> 
> However, feel free to add a test case specifically for the chunk codec
> 
> http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestChunkCoding.java
> 
> Oleg
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


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


Mime
View raw message