From: hno <> Date: Wed, 7 Feb 2007 07:48:15 +0000 (+0000) Subject: Bug #1787: Objects stuck in cache if origin server clock in future X-Git-Tag: SQUID_3_0_PRE6~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d465a25e9b529fb3379a5af9c34c9e896564a6f;p=thirdparty%2Fsquid.git Bug #1787: Objects stuck in cache if origin server clock in future --- diff --git a/src/store.cc b/src/store.cc index f9f441542a..777080ad79 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.602 2006/09/20 14:25:05 adrian Exp $ + * $Id: store.cc,v 1.603 2007/02/07 00:48:15 hno Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -1567,7 +1567,10 @@ storeTimestampsSet(StoreEntry * entry) if (squid_curtime > age) served_date = squid_curtime - age; - entry->expires = reply->expires; + if (reply->expires > 0 && reply->date > -1) + entry->expires = served_date + (reply->expires - reply->date); + else + entry->expires = reply->expires; entry->lastmod = reply->last_modified;