Some newer GraalVM versions appear to be throwing a hard error when the
PermGen flag is specified; this commit changes the behaviour so the flag
is only passed when the Java version is unknown or older than 1.8
Had a report out in the wild of a release file that doesn't end in a
terminating newline, which was causing the parser to blow up.
This commit relaxes the parsing to tolerate EOFs while parsing values.
There were a couple places where I relied on the manifest to have
the default libraries location of "libraries"; this commit fixes those
instances. Without this fix it would be possible for a custom libraries
URL path to leak into the local filesystem, which might've mucked
something up.
If a HTTP request failed to even connect, then the logic determining
whether to retry a partial download would inadvertently throw an error
before it could re-throw the causing error, which resulted in a
confusing error dialog.
An oversight in the implementation of partial download resumption led
to cross-contamination in the presence of multiple request URLs, where
an `Accept-Ranges` header from one server would cause a `Range` header
to be supplied to the next. Compounded with a bad ternary expression
in `HttpRequest` which couldn't handle non-200 success codes, this
was causing cryptic "Stream closed" errors on library downloads.
Previously the launcher was downloading these files once for every
processor due to code architecture limitations. By moving the download
queueing step into BaseUpdater we ensure they are only downloaded once.
It seems that some HTTP servers can silently close the connection before
the file has finished transferring. Since we count the transferred bytes
anyway, throw an exception if we didn't get the number of bytes the
server previously told us to expect.
Cloudflare, and some other MITM proxies consider the default Java HttpURLConnection
from Java 1.8 to be an invalid, unsafe request and reject it. This leads to CF returning a
403 on request. This commit adds the same User-Agent that's applied to the other calls, so
that those that front their SKMC launcher news page with Cloudflare can have successful
page loads.