On Tue, 2010-08-31 at 16:55 -0700, Yongxing Wang wrote:
> 
> Oleg,
> 
> We are using HTTP NIO in our production env and we recently found out that we 
> can not download any file with size greater than Integer.MAX_VALUE. The 
> amount 
> of data we can download is always "actual_file_size - Integer.MAX_VALUE" in 
> that 
> case.
> 
> Further looking into the code, I have found that the implementation of 
> LengthDelimitedDecoder there is a line of code:
> 
>  int lenRemaining = (int) (this.contentLength - this.len);
> 
> I believe the cast to int is causing the problem when contentLength is over 
> 4G. 
> Once I changed lenRemaining to long and make other necessary changes to let 
> it 
> compile, it works like charm.
> 
> Please take a look and let me know whether it is legitimate.
> 

Hi Yong

Yes, it is. This is obviously a bug. Please raise a JIRA for this defect
[1]. Please also consider generating a patch with your changes and
contributing it to the project.

Cheers

Oleg

[1] https://issues.apache.org/jira/browse/HTTPCORE


> Thanks,
> Yong
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to