[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, master, updated. debian/2.2.22-3-18-g64eda5e
Stefan Fritsch
sf at sfritsch.de
Tue May 29 20:06:44 UTC 2012
The following commit has been merged in the master branch:
commit 6e4f89b67b2cf79a3cf68d96682162c424232f65
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Tue May 29 22:03:58 2012 +0200
Fix regression causing apache2 to cache "206 partial content" responses,
and then serving these partial responses when replying to normal
requests.
diff --git a/debian/changelog b/debian/changelog
index 818fb00..00015f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ apache2 (2.2.22-6) UNRELEASED; urgency=low
* Use "dh --with autotools_dev" instead of patching config.sub/config.guess.
* Change compiled-in document root to /var/www, to avoid strange error
messages.
+ * Fix regression causing apache2 to cache "206 partial content" responses,
+ and then serving these partial responses when replying to normal requests.
+ Closes: #671204
* Add section to security.conf that shows how to forbid access to VCS
directories. Closes: #548213
* Update ssl default cipher config, add alternative speed optimized config.
diff --git a/debian/patches/085_mod_cache_partial_content-2.2.x.patch b/debian/patches/085_mod_cache_partial_content-2.2.x.patch
new file mode 100644
index 0000000..7b4333c
--- /dev/null
+++ b/debian/patches/085_mod_cache_partial_content-2.2.x.patch
@@ -0,0 +1,71 @@
+Add r1343951 from upstream branch 2.2.x
+Debian bug #671204
+
+*) mod_disk_cache, mod_mem_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]
+
+
+Index: a/modules/cache/mod_cache.c
+===================================================================
+--- a/modules/cache/mod_cache.c (revision 1176912)
++++ a/modules/cache/mod_cache.c (working copy)
+@@ -473,7 +473,8 @@
+ * We include 304 Not Modified here too as this is the origin server
+ * telling us to serve the cached copy.
+ */
+- if (exps != NULL || cc_out != NULL) {
++ if ((exps != NULL || cc_out != NULL)
++ && r->status != HTTP_PARTIAL_CONTENT) {
+ /* We are also allowed to cache any response given that it has a
+ * valid Expires or Cache Control header. If we find a either of
+ * those here, we pass request through the rest of the tests. From
+@@ -486,6 +487,9 @@
+ * include the following: an Expires header (section 14.21); a
+ * "max-age", "s-maxage", "must-revalidate", "proxy-revalidate",
+ * "public" or "private" cache-control directive (section 14.9).
++ *
++ * But do NOT store 206 responses in any case since we
++ * don't (yet) cache partial responses.
+ */
+ }
+ else {
+Index: modules/cache/mod_mem_cache.c
+===================================================================
+--- a/modules/cache/mod_mem_cache.c (revision 1176912)
++++ a/modules/cache/mod_mem_cache.c (working copy)
+@@ -313,6 +313,14 @@
+ cache_object_t *obj, *tmp_obj;
+ mem_cache_object_t *mobj;
+
++ /* 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;
++ }
++
+ if (len == -1) {
+ /* Caching a streaming response. Assume the response is
+ * less than or equal to max_streaming_buffer_size. We will
+Index: modules/cache/mod_disk_cache.c
+===================================================================
+--- a/modules/cache/mod_disk_cache.c (revision 1176912)
++++ a/modules/cache/mod_disk_cache.c (working copy)
+@@ -330,6 +330,14 @@
+ 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;
++ }
++
+ /* Allocate and initialize cache_object_t and disk_cache_object_t */
+ h->cache_obj = obj = apr_pcalloc(r->pool, sizeof(*obj));
+ obj->vobj = dobj = apr_pcalloc(r->pool, sizeof(*dobj));
diff --git a/debian/patches/series b/debian/patches/series
index 390102b..97d3006 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,6 +20,7 @@
082_ab_num_requests
083_dlopen_search_path
084_customize_apxs.patch
+085_mod_cache_partial_content-2.2.x.patch
201_build_suexec-custom
# The patch below must not be applied by quilt at extraction time. It depends
# on some script-fu to be executed before. Have a look
--
Debian packaging for apache2 (Apache HTTPD 2.x)
More information about the Pkg-apache-commits
mailing list