httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r538997 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_disk_cache.c
Date Thu, 17 May 2007 16:20:08 GMT
Author: jerenkrantz
Date: Thu May 17 09:20:06 2007
New Revision: 538997

URL: http://svn.apache.org/viewvc?view=rev&rev=538997
Log:
mod_disk_cache: When renegotiating an already cached Vary'd response, do not
let us later throw away the renegotiated content due to a name mismatch.

We do not need to update the ->name field just before writing the headers as
the computed ->name on open and create is sufficient.  Updating ->name here is
essentially a no-op - except in the case of Vary where the key has internally
changed (to account for the Vary prefix), but the original name has not.
However, writing the Vary'd-accounted key means that when we read the cache
next that we will error out and disregard the just renegotiated response and
fetch the content all over again - oops!

(This is largely a case where I think we may have overthought ourselves; hence
the explanation is here in the commit rather than in the file itself.)

* modules/cache/mod_disk_cache.c
  (store_headers): The originally opened ->name is sufficient.
* CHANGES: Combined with r538992, note that renegotiation for Vary's seem to
  work far better.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/cache/mod_disk_cache.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=538997&r1=538996&r2=538997
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu May 17 09:20:06 2007
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_disk_cache: Allow Vary'd responses to be refreshed properly.
+     [Justin Erenkrantz]
+
   *) mod_cache: Allow caching of requests with query arguments when
      Cache-Control max-age is explicitly specified.  [Justin Erenkrantz]
 

Modified: httpd/httpd/trunk/modules/cache/mod_disk_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_disk_cache.c?view=diff&rev=538997&r1=538996&r2=538997
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_disk_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_disk_cache.c Thu May 17 09:20:06 2007
@@ -903,8 +903,6 @@
         return rv;
     }
 
-    dobj->name = h->cache_obj->key;
-
     disk_info.format = DISK_FORMAT_VERSION;
     disk_info.date = info->date;
     disk_info.expire = info->expire;



Mime
View raw message