[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#470652: apache2.2-common: mod_cache doesn't handle If-Range correctly



The mod_cache.c patch given earlier is not enough; the following
cache_storage.c patch is needed as well:

Index: modules/cache/cache_storage.c
===================================================================
--- modules/cache/cache_storage.c       (Revision 636503)
+++ modules/cache/cache_storage.c       (Arbeitskopie)
@@ -286,6 +286,12 @@
                 apr_table_unset(r->headers_in, "If-Range");
                 apr_table_unset(r->headers_in, "If-Unmodified-Since");

+                /* Do not do Range requests with our own conditionals: If
+                 * we get 304 the Range does not matter and otherwise the
+                 * entity changed and we want to have the complete entity
+                 */
+                apr_table_unset(r->headers_in, "Range");
+
                 etag = apr_table_get(h->resp_hdrs, "ETag");
                 lastmod = apr_table_get(h->resp_hdrs, "Last-Modified");




Reply to: