From: Francesco Chemolli Date: Fri, 28 May 2010 13:35:15 +0000 (+0200) Subject: Merged from trunk X-Git-Tag: take1~402^2~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26e43a81b025ecd40574bdcdefe7756d20ca0286;p=thirdparty%2Fsquid.git Merged from trunk --- 26e43a81b025ecd40574bdcdefe7756d20ca0286 diff --cc src/cache_cf.cc index 888bf9c5ea,0f4788c25b..2f5d3d7fb3 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@@ -2254,7 -2254,10 +2254,10 @@@ dump_refreshpattern(StoreEntry * entry if (head->flags.refresh_ims) storeAppendPrintf(entry, " refresh-ims"); + if (head->flags.store_stale) + storeAppendPrintf(entry, " store-stale"); + -#if HTTP_VIOLATIONS +#if USE_HTTP_VIOLATIONS if (head->flags.override_expire) storeAppendPrintf(entry, " override-expire"); @@@ -2300,7 -2303,9 +2303,9 @@@ parse_refreshpattern(refresh_t ** head double pct = 0.0; time_t max = 0; int refresh_ims = 0; + int store_stale = 0; + -#if HTTP_VIOLATIONS +#if USE_HTTP_VIOLATIONS int override_expire = 0; int override_lastmod = 0; @@@ -2355,7 -2360,9 +2360,9 @@@ while ((token = strtok(NULL, w_space)) != NULL) { if (!strcmp(token, "refresh-ims")) { refresh_ims = 1; + } else if (!strcmp(token, "store-stale")) { + store_stale = 1; -#if HTTP_VIOLATIONS +#if USE_HTTP_VIOLATIONS } else if (!strcmp(token, "override-expire")) override_expire = 1; @@@ -2408,7 -2415,10 +2415,10 @@@ if (refresh_ims) t->flags.refresh_ims = 1; + if (store_stale) + t->flags.store_stale = 1; + -#if HTTP_VIOLATIONS +#if USE_HTTP_VIOLATIONS if (override_expire) t->flags.override_expire = 1; diff --cc src/cf_gen_defines index c8ca74772c,bbebf6c17e..7b4361e09a --- a/src/cf_gen_defines +++ b/src/cf_gen_defines @@@ -9,7 -9,8 +9,8 @@@ BEGIN define["FOLLOW_X_FORWARDED_FOR"]="--enable-follow-x-forwarded-for" define["FOLLOW_X_FORWARDED_FOR&&DELAY_POOLS"]="--enable-follow-x-forwarded-for and --enable-delay-pools" define["FOLLOW_X_FORWARDED_FOR&&ICAP_CLIENT"]="--enable-follow-x-forwarded-for and --enable-icap-client" + define["FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER"]="--enable-follow-x-forwarded-for and --enable-linux-netfilter" - define["HTTP_VIOLATIONS"]="--enable-http-violations" + define["USE_HTTP_VIOLATIONS"]="--enable-http-violations" define["ICAP_CLIENT"]="--enable-icap-client" define["SQUID_SNMP"]="--enable-snmp" define["USE_ADAPTATION"]="--enable-ecap or --enable-icap-client" diff --cc src/structs.h index 12f160fa69,b8ddec90bf..c13757fff0 --- a/src/structs.h +++ b/src/structs.h @@@ -1082,7 -1085,8 +1085,8 @@@ struct _refresh_t struct { unsigned int icase:1; unsigned int refresh_ims:1; + unsigned int store_stale:1; -#if HTTP_VIOLATIONS +#if USE_HTTP_VIOLATIONS unsigned int override_expire:1; unsigned int override_lastmod:1; unsigned int reload_into_ims:1;