Fix autotest failures in QAbstractNetworkCache
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Thu, 12 Apr 2012 16:28:37 +0000 (17:28 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 12 Apr 2012 16:49:14 +0000 (18:49 +0200)
commit3c0fdefc318eeeb019b3727962bea7ba7ea236d2
tree44375bbab07dc9c7d232b8d1b701a0d1716ea2a0
parent17412400dc2887ccd52014a9c261c6ab1da44e01
Fix autotest failures in QAbstractNetworkCache

The cache expiration calculation was previously removed to avoid
calculating it every time an object is fetched from the cache.
This is because the expiration date is calculated from max-age or
expires headers when the object is added to the cache.

However this broke the case where the server only provides a
last-modified header. In this case, the expiration date needs
to be checked at fetch time in order to add the warning if the
object is >24h old.

Change-Id: Iad381da0f91c27ac603abbaa94f268700ad2297f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/network/access/qnetworkreplyhttpimpl.cpp