On 04.06.2010 02:17, [email protected] wrote: > 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; > + } > +
Why is this needed? mod_cache itself does not allow partial content to be cached and even if this does not work it should be fixed there and not in one of the storage providers. Regards Rüdiger
