]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
log warnings when override-expire or override-lastmod are used
authorwessels <>
Tue, 18 Aug 1998 03:35:49 +0000 (03:35 +0000)
committerwessels <>
Tue, 18 Aug 1998 03:35:49 +0000 (03:35 +0000)
src/cache_cf.cc

index 6ed6ca509ec9d8a6ac7dbcf3f52dbfcf0f32c819..25744f0f52a033842317bdb961ab267eb94ef2b6 100644 (file)
@@ -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