You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Greg Bowyer (JIRA)" <ji...@apache.org> on 2011/08/12 22:43:32 UTC

[jira] [Updated] (HTTPCLIENT-1116) ResponseCachingPolicy uses integers for sizes

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

Greg Bowyer updated HTTPCLIENT-1116:
------------------------------------

    Description: 
ResponseCachingPolicy currently uses integers for interpreting the size of Content-Length, as well internally.

This causes issues in attempting to use the module for caching entities that are over 2GB in size, the module does not fail gracefully, but throws a NumberFormatException

I have a patch that fixes this, by promoting the int -> long, which should allow for larger entities to be cached, it also updates the public facing API where possible, I don't think that the promotion should break compatibility massively

The changes can also be seen here:
https://github.com/GregBowyer/httpclient/commit/1197d3f94bd2eedcec32646cd6146748ca2e6fa1

  was:
ResponseCachingPolicy currently uses integers for interpreting the size of Content-Length, as well internally.

This causes issues in attempting to use the module for caching entities that are over 2GB in size, the module does not fail gracefully, but throws a NumberFormatException

I have a patch that fixes this, by promoting the int -> long, which should allow for larger entities to be cached, it also updates the public facing API where possible, I don't think that the promotion should break compatibility massively


> ResponseCachingPolicy uses integers for sizes
> ---------------------------------------------
>
>                 Key: HTTPCLIENT-1116
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1116
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 4.1.1, 4.2 Alpha1
>            Reporter: Greg Bowyer
>              Labels: cache, policy
>         Attachments: 0001-Changed-the-ResponseCachingPolicy-to-use-longs.patch
>
>
> ResponseCachingPolicy currently uses integers for interpreting the size of Content-Length, as well internally.
> This causes issues in attempting to use the module for caching entities that are over 2GB in size, the module does not fail gracefully, but throws a NumberFormatException
> I have a patch that fixes this, by promoting the int -> long, which should allow for larger entities to be cached, it also updates the public facing API where possible, I don't think that the promotion should break compatibility massively
> The changes can also be seen here:
> https://github.com/GregBowyer/httpclient/commit/1197d3f94bd2eedcec32646cd6146748ca2e6fa1

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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