From: Bill Stoddard Date: Wed, 4 Aug 2004 02:35:07 +0000 (+0000) Subject: adding 304 support for if-Modified-Since request header, if a fresh cached entity... X-Git-Tag: STRIKER_2_0_51_RC1^2~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71a20ed345eaa44651e5e8a9ef7ad17a6dc9b626;p=thirdparty%2Fapache%2Fhttpd.git adding 304 support for if-Modified-Since request header, if a fresh cached entity is present. backport from 2.1 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@104472 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_cache.c b/modules/experimental/mod_cache.c index 8c0f5f65775..9cbc0ba5508 100644 --- a/modules/experimental/mod_cache.c +++ b/modules/experimental/mod_cache.c @@ -173,6 +173,13 @@ static int cache_url_handler(request_rec *r, int lookup) if (lookup) { return OK; } + + info = &(cache->handle->cache_obj->info); + + if (info && info->lastmod) { + ap_update_mtime(r, info->lastmod); + } + rv = ap_meets_conditions(r); if (rv != OK) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,