Use headers for lastUpdate/lastModified

This commit is contained in:
Martin Fietz 2016-01-30 12:42:58 +01:00
parent 8c3a9986f0
commit 20ccfbb809
1 changed files with 6 additions and 0 deletions

View File

@ -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();
}