Hotfix for servers not accepting the Range header

Because of #2339, the file always exists when starting a download.
There is still an issue with the server parsing "Range: bytes=0-"
incorrectly, but this commit should make the error appear less often.

Related to #2539
This commit is contained in:
ByteHamster 2018-01-23 23:31:05 +01:00
parent 34a5d7eb17
commit bc9d39dedf
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ public class HttpDownloader extends Downloader {
// add range header if necessary
if (fileExists) {
if (fileExists && destination.length() > 0) {
request.setSoFar(destination.length());
httpReq.addHeader("Range", "bytes=" + request.getSoFar() + "-");
Log.d(TAG, "Adding range header: " + request.getSoFar());