From 0d465a25e9b529fb3379a5af9c34c9e896564a6f Mon Sep 17 00:00:00 2001 From: hno <> Date: Wed, 7 Feb 2007 07:48:15 +0000 Subject: [PATCH] Bug #1787: Objects stuck in cache if origin server clock in future --- src/store.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.47.3