You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2008/03/02 13:35:34 UTC
svn commit: r632749 - in /httpd/httpd/trunk: CHANGES
modules/cache/cache_util.c
Author: rpluem
Date: Sun Mar 2 04:35:33 2008
New Revision: 632749
URL: http://svn.apache.org/viewvc?rev=632749&view=rev
Log:
* If the cached entity contained Cache-Control: no-cache, treat it as stale
causing revalidation.
PR: 44511
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/cache/cache_util.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=632749&r1=632748&r2=632749&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Mar 2 04:35:33 2008
@@ -2,6 +2,9 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) mod_cache: Revalidate cache entities which have Cache-Control: no-cache
+ set in their response headers. PR 44511 [Ruediger Pluem]
+
*) mod_rewrite: Check all files used by DBM maps for freshness, mod_rewrite
didn't pick up on updated sdbm maps due to this.
PR41190 [Niklas Edmundsson]
Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=632749&r1=632748&r2=632749&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Sun Mar 2 04:35:33 2008
@@ -235,6 +235,14 @@
cc_cresp = apr_table_get(h->resp_hdrs, "Cache-Control");
expstr = apr_table_get(h->resp_hdrs, "Expires");
+ if (ap_cache_liststr(NULL, cc_cresp, "no-cache", NULL)) {
+ /*
+ * The cached entity contained Cache-Control: no-cache, so treat as
+ * stale causing revalidation
+ */
+ return 0;
+ }
+
if ((agestr = apr_table_get(h->resp_hdrs, "Age"))) {
age_c = apr_atoi64(agestr);
}