Use resource cache as long as it is no older than network resource.

This allows chache to be used when cdn provides different values for get-vs-head, or for cdn with different resource times in different requests of different sessions.
This commit is contained in:
Howard Stearns 2015-05-11 10:01:49 -07:00
parent 17e3f3b48d
commit aed165809c

View file

@ -350,7 +350,7 @@ void Resource::maybeRefresh() {
QDateTime lastModified = variant.value<QDateTime>();
QDateTime lastModifiedOld = metaData.lastModified();
if (lastModified.isValid() && lastModifiedOld.isValid() &&
lastModifiedOld == lastModified) {
lastModifiedOld >= lastModified) {
qCDebug(networking) << "Using cached version of" << _url.fileName();
// We don't need to update, return
return;