Index: squid/src/refresh.c diff -u squid/src/refresh.c:1.1.1.10 squid/src/refresh.c:1.1.1.10.4.1 --- squid/src/refresh.c:1.1.1.10 Thu Sep 24 00:19:40 1998 +++ squid/src/refresh.c Sun Oct 18 12:08:16 1998 @@ -49,8 +49,17 @@ int conf_max_age_stale; int last_modified_factor_fresh; int last_modified_factor_stale; + int last_modified_now_stale; + int last_modified_future_maybe; int conf_min_age_fresh; int default_stale; +#if HTTP_VIOLATIONS + int reload_into_ims_stale; + int override_lastmod_fresh; + int override_expire_fresh; + int ignore_reload_maybe; + int reload_stale; +#endif } refreshCounts; /* @@ -149,13 +158,16 @@ if (ignore_reload) { /* The clients no-cache header is ignored */ debug(22, 3) ("refreshCheck: MAYBE: ignore-reload\n"); + refreshCounts.ignore_reload_maybe++; } else if (reload_into_ims) { /* The clients no-cache header is changed into a IMS query */ debug(22, 3) ("refreshCheck: YES: reload-into-ims\n"); + refreshCounts.reload_into_ims_stale++; return 1; } else { /* The clients no-cache header is not overridden on this request */ debug(22, 3) ("refreshCheck: YES: client reload\n"); + refreshCounts.reload_stale++; request->flags.nocache = 1; return 1; } @@ -171,6 +183,7 @@ #if HTTP_VIOLATIONS if (override_expire && age <= min) { debug(22, 3) ("refreshCheck: NO: age < min && override_expire\n"); + refreshCounts.override_expire_fresh++; return 0; } #endif @@ -193,6 +206,7 @@ #if HTTP_VIOLATIONS if (override_lastmod && age <= min) { debug(22, 3) ("refreshCheck: NO: age < min && override_lastmod\n"); + refreshCounts.override_lastmod_fresh++; return 0; } #endif @@ -208,6 +222,13 @@ refreshCounts.last_modified_factor_stale++; return 1; } + } else if (entry->lastmod > -1 && entry->timestamp == entry->lastmod) { + debug(22, 3) ("refreshCheck: YES: last-modified 'now'\n"); + refreshCounts.last_modified_now_stale++; + return 1; + } else if (entry->lastmod > -1 && entry->timestamp < entry->lastmod) { + debug(22, 3) ("refreshCheck: MAYBE: last-modified in the future\n"); + refreshCounts.last_modified_future_maybe++; } if (age <= min) { debug(22, 3) ("refreshCheck: NO: age < min\n"); @@ -304,8 +325,24 @@ refreshCounts.last_modified_factor_fresh); storeAppendPrintf(sentry, "refreshCounts.last_modified_factor_stale\t%d\n", refreshCounts.last_modified_factor_stale); + storeAppendPrintf(sentry, "refreshCounts.last_modified_now_stale\t%d\n", + refreshCounts.last_modified_now_stale); + storeAppendPrintf(sentry, "refreshCounts.last_modified_future_maybe\t%d\n", + refreshCounts.last_modified_future_maybe); storeAppendPrintf(sentry, "refreshCounts.conf_min_age_fresh\t%d\n", refreshCounts.conf_min_age_fresh); +#if HTTP_VIOLATIONS + storeAppendPrintf(sentry, "refreshCounts.reload_into_ims_stale\t%d\n", + refreshCounts.reload_into_ims_stale); + storeAppendPrintf(sentry, "refreshCounts.override_lastmod_fresh\t%d\n", + refreshCounts.override_lastmod_fresh); + storeAppendPrintf(sentry, "refreshCounts.override_expire_fresh\t%d\n", + refreshCounts.override_expire_fresh); + storeAppendPrintf(sentry, "refreshCounts.ignore_reload_maybe\t%d\n", + refreshCounts.ignore_reload_maybe); + storeAppendPrintf(sentry, "refreshCounts.reload_stale\t%d\n", + refreshCounts.reload_stale); +#endif storeAppendPrintf(sentry, "refreshCounts.default_stale\t%d\n", refreshCounts.default_stale); }