Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) mod_disk_cache: If possible, check if the size of an object to cache is
+ within the configured boundaries before actually saving data.
+ [Niklas Edmundsson <nikke acc.umu.se>]
+
*) mod_cache: Convert all values to seconds before comparing them when
checking whether to send a Warning header for a stale response.
PR 39713. [Owen Taylor <otaylor redhat.com>]
return DECLINED;
}
+ /* Note, len is -1 if unknown so don't trust it too hard */
+ if (len > conf->maxfs) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "disk_cache: URL %s failed the size check "
+ "(%" APR_OFF_T_FMT " > %" APR_SIZE_T_FMT ")",
+ key, len, conf->maxfs);
+ return DECLINED;
+ }
+ if (len >= 0 && len < conf->minfs) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "disk_cache: URL %s failed the size check "
+ "(%" APR_OFF_T_FMT " < %" APR_SIZE_T_FMT ")",
+ key, len, conf->minfs);
+ return DECLINED;
+ }
+
/* Allocate and initialize cache_object_t and disk_cache_object_t */
h->cache_obj = obj = apr_pcalloc(r->pool, sizeof(*obj));
obj->vobj = dobj = apr_pcalloc(r->pool, sizeof(*dobj));