Fix the Range attribute for downloading

This commit is contained in:
Maschell 2019-04-30 09:31:31 +02:00
parent 3eb299d3a1
commit 95a25c4bcf

View File

@ -86,7 +86,7 @@ public final class NUSDownloadService extends Downloader {
URL url_obj = new URL(URL);
HttpURLConnection connection = (HttpURLConnection) url_obj.openConnection();
connection.setRequestProperty("User-Agent", Settings.USER_AGENT);
connection.setRequestProperty("Range", "bytes=" + offset + "-" + Long.toString(size));
connection.setRequestProperty("Range", "bytes=" + offset + "-" + Long.toString(offset + size));
try {
connection.connect();
} catch (Exception e) {