[rfc][icedtea-web] fix cache in case of urls with query
Jiri Vanek
jvanek at redhat.com
Wed May 20 13:50:15 UTC 2015
Another bug, originally related to -html, but much more widespread is related to compressed streams.
Our glorious cache, is removing query when it is crating path to cached file. Obviously it is very
wrong when jnlp file is based on this query, but mostly it is not observable.
But, when this url with query is send as compressed stream, then .gz (or any other suffix depending
on compression) is attached. But.... it is attached *behind* query so once query is remove, the
cache file have same suffix as final file, so it successfully rewrite itself.
http://server/pahe.php?key=value
=> came as gzipped, so it is understand by itw as
http://server/pahe.php?key=value.gz
but both http://server/pahe.php?key=value and http://server/pahe.php?key=value.gz
are stored in cache as
http/server/pahe.php
I Have chosen the fix by using also query in resulted name, but I have some feelings, that query was
already removed in past - but
http://icedtea.classpath.org/hg/icedtea-web/annotate/2b992e566c1f/netx/net/sourceforge/jnlp/cache/CacheUtil.java#l483
speak differently, so...
Another fix may be to put suffixes after file, but before query. It is less invasive, and is fixing
the bug I was facing. But what about generated jnlps? I think he best way is ti use also whole
query,,,, The filename is sanitized anyway.
J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixCache.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20150520/8182b253/fixCache.patch>
More information about the distro-pkg-dev
mailing list