You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2010/09/08 21:54:33 UTC

[jira] Resolved: (HTTPCORE-231) can not download file size greater than Integer.MAX_VALUE

     [ https://issues.apache.org/jira/browse/HTTPCORE-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-231.
----------------------------------------

    Fix Version/s: 4.0.2
       Resolution: Fixed

Patch checked in.

Oleg

> can not download file size greater than Integer.MAX_VALUE
> ---------------------------------------------------------
>
>                 Key: HTTPCORE-231
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-231
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.1-beta2
>            Reporter: Yongxing Wang
>             Fix For: 4.0.2, 4.1
>
>         Attachments: HTTPCORE-231.patch
>
>
> 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 great.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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