mirror of
https://github.com/SKCraft/Launcher.git
synced 2025-01-07 19:29:03 +01:00
Fix NPE in HttpDownloader if server does not send Accept-Ranges header
This commit is contained in:
parent
cf7e12b4d1
commit
cdb32a3fe7
@ -350,7 +350,7 @@ public class HttpRequest implements Closeable, ProgressObservable {
|
||||
}
|
||||
|
||||
public Optional<PartialDownloadInfo> canRetryPartial() {
|
||||
if (conn.getHeaderField("Accept-Ranges").equals("bytes")) {
|
||||
if ("bytes".equals(conn.getHeaderField("Accept-Ranges"))) {
|
||||
return Optional.of(new PartialDownloadInfo(contentLength, readBytes));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user