diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2018-01-24 08:04:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 08:04:12 +0100 |
commit | 287bb5f7e1ba528d4cc322a959d51627dbbb3c7b (patch) | |
tree | a2c8549c5e4524fe9520c1ff44f32dfa04b3fc08 /core | |
parent | c79b003dff7d6064c275e1d3ab6ccc4d13067620 (diff) | |
parent | bc9d39dedf3bd1caf4cf06e92b6c56513538ba03 (diff) | |
download | AntennaPod-287bb5f7e1ba528d4cc322a959d51627dbbb3c7b.zip |
Merge pull request #2550 from ByteHamster/download-range
Hotfix for servers not accepting the Range header
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java index 181a6f619..7ab0931d6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java @@ -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()); |