[icedtea-web] RFC: Fix caching of compressed content
Andrew Azores
aazores at redhat.com
Fri May 2 20:58:26 UTC 2014
On 05/02/2014 04:32 PM, Omair Majid wrote:
> Hi,
>
> It was brought to my attention that icedtea-web was re-downloading the
> jars (which should have been cached) on subsequent runs of a jnlp
> application. I dug into it and found a real bug.
>
> To decide if an item is cached, icedtea-web does a HEAD request and
> compares the Content-Length with the size of the file. This works fine
> when the jars were not compressed. When the jars are fetched compressed
> and then uncompressed on disk, there is a mismatch between the sizes and
> icedtea-web decides the content is not cached.
>
> The attached patch stores the compressed size in the cache info file and
> uses that instead of the actual file size in the size-comparison.
>
> Thoughts?
>
> Thanks,
> Omair
>
Looks good, and I like the defaultValue param on getLongKey :)
Can there be a reproducer for this? Or is there already an existing one?
Manually testing looks good though, nothing appears broken and applets
(eg Elluminate) don't appear to be redownloading, according to the
progress bar which just jumps from 0 to 100. The delay before this
happens is just the overhead from establishing a connection and waiting
for the result of the HEAD request(s), right?
Thanks,
--
Andrew A
More information about the distro-pkg-dev
mailing list