From: wessels <> Date: Tue, 18 Aug 1998 03:35:49 +0000 (+0000) Subject: log warnings when override-expire or override-lastmod are used X-Git-Tag: SQUID_3_0_PRE1~2878 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ed0c5f0caf26b2e61ad4b7923ff8c5ae47549f6;p=thirdparty%2Fsquid.git log warnings when override-expire or override-lastmod are used --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 6ed6ca509e..25744f0f52 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.295 1998/08/17 21:27:30 wessels Exp $ + * $Id: cache_cf.cc,v 1.296 1998/08/17 21:35:49 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -213,6 +213,7 @@ configDoConfigure(void) int i; SwapDir *SD; fileMap *fm; + const refresh_t *R; int n; memset(&Config2, '\0', sizeof(SquidConfig2)); /* init memory as early as possible */ @@ -312,6 +313,18 @@ configDoConfigure(void) requirePathnameExists("redirect_program", Config.Program.redirect); requirePathnameExists("Icon Directory", Config.icons.directory); requirePathnameExists("Error Directory", Config.errorDirectory); + for (R = Config.Refresh; R; R = R->next) { + if (!R->flags.override_expire) + continue; + debug(22,1)("WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP\n"); + break; + } + for (R = Config.Refresh; R; R = R->next) { + if (!R->flags.override_lastmod) + continue; + debug(22,1)("WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP\n"); + break; + } } /* Parse a time specification from the config file. Store the