From 20ccfbb809cef53628bb6d05925e8e2d54c4cc36 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Sat, 30 Jan 2016 12:42:58 +0100 Subject: [PATCH] Use headers for lastUpdate/lastModified --- .../antennapod/core/service/download/HttpDownloader.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 0b9fba6f7..d0bd019f6 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 @@ -235,6 +235,12 @@ public class HttpDownloader extends Downloader { onFail(DownloadError.ERROR_IO_ERROR, "Download completed, but nothing was read"); return; } + String lastModified = response.header("Last-Modified"); + if(lastModified != null) { + request.setLastModified(lastModified); + } else { + request.setLastModified(response.header("ETag")); + } onSuccess(); }