mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-25 09:26:55 +01:00
Fix the Range attribute for downloading
This commit is contained in:
parent
3eb299d3a1
commit
95a25c4bcf
@ -86,7 +86,7 @@ public final class NUSDownloadService extends Downloader {
|
|||||||
URL url_obj = new URL(URL);
|
URL url_obj = new URL(URL);
|
||||||
HttpURLConnection connection = (HttpURLConnection) url_obj.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) url_obj.openConnection();
|
||||||
connection.setRequestProperty("User-Agent", Settings.USER_AGENT);
|
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 {
|
try {
|
||||||
connection.connect();
|
connection.connect();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user