--- a/configure.ac +++ b/configure.ac @@ -131,7 +131,6 @@ IT_FIND_JAVADOC IT_FIND_KEYTOOL IT_FIND_JARSIGNER -IT_FIND_PACK200 IT_SET_VERSION IT_CHECK_XULRUNNER_VERSION @@ -155,7 +154,6 @@ JAVA_DESKTOP=java.desktop JAVA_NAMING=java.naming fi -IT_CHECK_FOR_CLASS(JAVA_UTIL_JAR_PACK200, [java.util.jar.Pack200], [some.pkg], []) IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager], [some.pkg], []) IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie], [some.pkg], []) IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler], [some.pkg], []) --- a/netx/net/sourceforge/jnlp/cache/ResourceDownloader.java +++ b/netx/net/sourceforge/jnlp/cache/ResourceDownloader.java @@ -25,7 +25,6 @@ import java.util.List; import java.util.Map; import java.util.jar.JarOutputStream; -import java.util.jar.Pack200; import java.util.zip.GZIPInputStream; import net.sourceforge.jnlp.DownloadOptions; @@ -151,7 +150,7 @@ try { resource.setDownloadLocation(location.URL); URLConnection connection = ConnectionFactory.getConnectionFactory().openConnection(location.URL); // this won't change so should be okay not-synchronized - connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); + connection.addRequestProperty("Accept-Encoding", "gzip"); File localFile = null; if (resource.getRequestVersion() == resource.getDownloadVersion()) { @@ -293,7 +292,7 @@ URL url = urls.get(i); try { Map requestProperties = new HashMap<>(); - requestProperties.put("Accept-Encoding", "pack200-gzip, gzip"); + requestProperties.put("Accept-Encoding", "gzip"); UrlRequestResult response = getUrlResponseCodeWithRedirectonResult(url, requestProperties, requestMethod); if (response.result == 511) { @@ -390,7 +389,7 @@ private URLConnection getDownloadConnection(URL location) throws IOException { URLConnection con = ConnectionFactory.getConnectionFactory().openConnection(location); - con.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); + con.addRequestProperty("Accept-Encoding", "gzip"); con.connect(); return con; } @@ -500,21 +499,7 @@ } private void uncompressPackGz(URL compressedLocation, URL uncompressedLocation, Version version) throws IOException { - OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Extracting packgz: " + compressedLocation + " to " + uncompressedLocation); - - try (GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil - .getCacheFile(compressedLocation, version)))) { - InputStream inputStream = new BufferedInputStream(gzInputStream); - - JarOutputStream outputStream = new JarOutputStream(new FileOutputStream(CacheUtil - .getCacheFile(uncompressedLocation, version))); - - Pack200.Unpacker unpacker = Pack200.newUnpacker(); - unpacker.unpack(inputStream, outputStream); - - outputStream.close(); - inputStream.close(); - } + throw new UnsupportedOperationException("Pack200 compression is no longer supported, cannot unpack " + compressedLocation); } /**