the calculated ETag should be compared to the stored ETag

Thanks to @amiraliakbari for tracking this down!

closes fdroid/fdroidclient#1737
This commit is contained in:
Hans-Christoph Steiner 2019-05-10 12:00:20 +02:00
parent 8d60f40e98
commit 86908ceeaa

View File

@ -147,9 +147,9 @@ public class HttpDownloader extends Downloader {
} else {
String calcedETag = String.format("\"%x-%x\"",
tmpConn.getLastModified() / 1000, contentLength);
if (calcedETag.equals(headETag)) {
if (cacheTag.equals(calcedETag)) {
Utils.debugLog(TAG, urlString + " cached based on calced ETag, not downloading: " +
headETag);
calcedETag);
return;
}
}