You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Jon Moore (Updated) (JIRA)" <ji...@apache.org> on 2012/03/15 18:55:38 UTC
[jira] [Updated] (HTTPCLIENT-1164) Compressed entities are not
being cached properly
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jon Moore updated HTTPCLIENT-1164:
----------------------------------
Component/s: (was: Cache)
HttpClient
Fix Version/s: 4.2 Beta2
This should clearly go into 4.2, at least. Oleg, what's your thought on backporting? Do we have plans for a 4.1.4 release anytime soon (or sooner than 4.2 GA)? I think this is technically not a bug, per se, because everything still works correctly HTTP-wise. I'll default to backporting it next week unless folks have opinions it's not worth it.
> Compressed entities are not being cached properly
> -------------------------------------------------
>
> Key: HTTPCLIENT-1164
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1164
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: Snapshot
> Reporter: Manish Tripathi
> Assignee: Jon Moore
> Fix For: 4.2 Beta2
>
>
> org.apache.http.impl.client.cache.CacheValidityPolicy.contentLengthHeaderMatchesActualLength() returns false for entities decompressed by ContentEncodingHttpClient, because the length of decompressed entity stored in cache will be different from the length specified in the response header.
> Consequently, gzipped/deflated entities will never be satisfied from the cache.
> Proposed fix: introduce new field in HttpCacheEntry() - actualContentLength, and populate it with the actual content length rigth before the cache entry is stored in the cache. Change the org.apache.http.impl.client.cache.CacheValidityPolicy.contentLengthHeaderMatchesActualLength() method to compare
> entry.getResource().length() with entry.getActualContentLength()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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