You are viewing a plain text version of this content. The canonical link for it is here.
Posted to announce@apache.org by Oleg Kalnichevski <ol...@apache.org> on 2010/08/31 23:25:55 UTC

[ANNOUNCEMENT] HttpComponents HttpCore 4.1-beta2 Released

The Apache HttpComponents project is pleased to announce the release of
HttpComponents HttpCore 4.1-beta2. This version fixes a number of
non-critical bugs found since the previous release. The 4.1 code line is
expected to supersede 4.0 as recommended for use in production with the
next release.

Download -
<http://hc.apache.org/downloads.cgi>
Release notes -
<http://www.apache.org/dist/httpcomponents/httpcore/RELEASE_NOTES.txt>
HttpComponents site - 
<http://hc.apache.org/>

About HttpComponents Core -
HttpCore is a set of low level HTTP transport components that can be
used to build custom client and server side HTTP services with a minimal
footprint. HttpCore supports two I/O models: blocking I/O model based on
the classic Java I/O and non-blocking, event driven I/O model based on
Java NIO. The blocking I/O model may be more appropriate for data
intensive, low latency scenarios, whereas the non-blocking model may be
more appropriate for high latency scenarios where raw data throughput is
less important than the ability to handle thousands of simultaneous HTTP
connections in a resource efficient manner.


Re: can not dowload file size greater than Integer.MAX_VALUE

Posted by Oleg Kalnichevski <ol...@apache.org>.
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: 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


can not dowload file size greater than Integer.MAX_VALUE

Posted by Yongxing Wang <yo...@yahoo.com>.

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.

Thanks,
Yong


      

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