httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r951222 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_disk_cache.c
Date Fri, 04 Jun 2010 00:17:17 GMT
Author: minfrin
Date: Fri Jun  4 00:17:16 2010
New Revision: 951222

URL: http://svn.apache.org/viewvc?rev=951222&view=rev
Log:
mod_disk_cache: Decline the opportunity to cache if the response is
a 206 Partial Content. This stops a reverse proxied partial response
from becoming cached, and then being served in subsequent responses.

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?rev=951222&r1=951221&r2=951222&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Jun  4 00:17:16 2010
@@ -28,6 +28,11 @@ Changes with Apache 2.3.6
      processing is completed, avoiding orphaned callback pointers.
      [Brett Gervasoni <brettg senseofsecurity.com>, Jeff Trawick]
 
+  *) mod_disk_cache: Decline the opportunity to cache if the response is
+     a 206 Partial Content. This stops a reverse proxied partial response
+     from becoming cached, and then being served in subsequent responses.
+     [Graham Leggett]
+
   *) mod_deflate: avoid the risk of forwarding data before headers are set.
      PR 49369 [Matthew Steele <mdsteele google.com>]
 

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?rev=951222&r1=951221&r2=951222&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_disk_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_disk_cache.c Fri Jun  4 00:17:16 2010
@@ -333,6 +333,14 @@ static int create_entity(cache_handle_t 
         return DECLINED;
     }
 
+    /* we don't support caching of range requests (yet) */
+    if (r->status == HTTP_PARTIAL_CONTENT) {
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                     "disk_cache: URL %s partial content response not cached",
+                     key);
+        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,



Mime
View raw message