[Pkg-apache-commits] r922 - in /branches/lenny-apache2: changelog patches/00list patches/068_fix_deflate_etag_PR45023.dpatch
sf at alioth.debian.org
sf at alioth.debian.org
Sun May 17 09:12:57 UTC 2009
Author: sf
Date: Sun May 17 09:12:56 2009
New Revision: 922
URL: http://svn.debian.org/wsvn/pkg-apache/?sc=1&rev=922
Log:
mod_deflate: Fix invalid etag generation
Added:
branches/lenny-apache2/patches/068_fix_deflate_etag_PR45023.dpatch
Modified:
branches/lenny-apache2/changelog
branches/lenny-apache2/patches/00list
Modified: branches/lenny-apache2/changelog
URL: http://svn.debian.org/wsvn/pkg-apache/branches/lenny-apache2/changelog?rev=922&op=diff
==============================================================================
--- branches/lenny-apache2/changelog (original)
+++ branches/lenny-apache2/changelog Sun May 17 09:12:56 2009
@@ -2,6 +2,9 @@
* Take care to not override existing index.shtml files when upgrading from
before 2.2.8-1 (closes: #517089).
+ * mod_deflate: Fix invalid etag to be emitted for on-the-fly gzip
+ content-encoding. This prevented apache from sending "304 NOT MODIFIED"
+ responses for compressed content.
-- Stefan Fritsch <sf at debian.org> Mon, 02 Mar 2009 22:16:34 +0100
Modified: branches/lenny-apache2/patches/00list
URL: http://svn.debian.org/wsvn/pkg-apache/branches/lenny-apache2/patches/00list?rev=922&op=diff
==============================================================================
--- branches/lenny-apache2/patches/00list (original)
+++ branches/lenny-apache2/patches/00list Sun May 17 09:12:56 2009
@@ -26,6 +26,7 @@
065_mod_proxy_segfault_PR45792.dpatch
066_mpm_worker_segfault_PR45605.dpatch
067_check_pollset_create_error.dpatch
+068_fix_deflate_etag_PR45023.dpatch
099_config_guess_sub_update
200_cp_suexec.dpatch
201_build_suexec-custom.dpatch
Added: branches/lenny-apache2/patches/068_fix_deflate_etag_PR45023.dpatch
URL: http://svn.debian.org/wsvn/pkg-apache/branches/lenny-apache2/patches/068_fix_deflate_etag_PR45023.dpatch?rev=922&op=file
==============================================================================
--- branches/lenny-apache2/patches/068_fix_deflate_etag_PR45023.dpatch (added)
+++ branches/lenny-apache2/patches/068_fix_deflate_etag_PR45023.dpatch Sun May 17 09:12:56 2009
@@ -1,0 +1,51 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 068_fix_deflate_etag_PR45023.dpatch by Stefan Fritsch <sf at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: https://issues.apache.org/bugzilla/show_bug.cgi?id=45023
+
+ at DPATCH@
+diff -urNad lenny-apache2~/modules/filters/mod_deflate.c lenny-apache2/modules/filters/mod_deflate.c
+--- lenny-apache2~/modules/filters/mod_deflate.c 2009-05-17 10:55:23.000000000 +0200
++++ lenny-apache2/modules/filters/mod_deflate.c 2009-05-17 10:59:52.191084777 +0200
+@@ -372,23 +372,7 @@
+ ctx->libz_end_func(&ctx->stream);
+ return APR_SUCCESS;
+ }
+-/* PR 39727: we're screwing up our clients if we leave a strong ETag
+- * header while transforming content. Henrik Nordstrom suggests
+- * appending ";gzip".
+- *
+- * Pending a more thorough review of our Etag handling, let's just
+- * implement his suggestion. It fixes the bug, or at least turns it
+- * from a showstopper to an inefficiency. And it breaks nothing that
+- * wasn't already broken.
+- */
+-static void deflate_check_etag(request_rec *r, const char *transform)
+-{
+- const char *etag = apr_table_get(r->headers_out, "ETag");
+- if (etag && (((etag[0] != 'W') && (etag[0] !='w')) || (etag[1] != '/'))) {
+- apr_table_set(r->headers_out, "ETag",
+- apr_pstrcat(r->pool, etag, "-", transform, NULL));
+- }
+-}
++
+ static apr_status_t deflate_out_filter(ap_filter_t *f,
+ apr_bucket_brigade *bb)
+ {
+@@ -586,7 +570,6 @@
+ }
+ apr_table_unset(r->headers_out, "Content-Length");
+ apr_table_unset(r->headers_out, "Content-MD5");
+- deflate_check_etag(r, "gzip");
+
+ /* initialize deflate output buffer */
+ ctx->stream.next_out = ctx->buffer;
+@@ -1079,7 +1062,6 @@
+ /* these are unlikely to be set anyway, but ... */
+ apr_table_unset(r->headers_out, "Content-Length");
+ apr_table_unset(r->headers_out, "Content-MD5");
+- deflate_check_etag(r, "gunzip");
+
+ /* initialize inflate output buffer */
+ ctx->stream.next_out = ctx->buffer;
More information about the Pkg-apache-commits
mailing list