Use headers for lastUpdate/lastModified
This commit is contained in:
parent
8c3a9986f0
commit
20ccfbb809
|
@ -235,6 +235,12 @@ public class HttpDownloader extends Downloader {
|
||||||
onFail(DownloadError.ERROR_IO_ERROR, "Download completed, but nothing was read");
|
onFail(DownloadError.ERROR_IO_ERROR, "Download completed, but nothing was read");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
String lastModified = response.header("Last-Modified");
|
||||||
|
if(lastModified != null) {
|
||||||
|
request.setLastModified(lastModified);
|
||||||
|
} else {
|
||||||
|
request.setLastModified(response.header("ETag"));
|
||||||
|
}
|
||||||
onSuccess();
|
onSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue