]> granicus.if.org Git - apache/commitdiff
Always emit Vary header if mod_deflate is involved in the request.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Sun, 10 Nov 2002 06:09:20 +0000 (06:09 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Sun, 10 Nov 2002 06:09:20 +0000 (06:09 +0000)
Submitted by: Andr��Malo <nd@perlig.de>
Reviewed by: Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97473 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_deflate.c

diff --git a/CHANGES b/CHANGES
index 60f6573a3655eb5c85aebd2a5e072ed1aca1e09d..9ed42633642722afb2bd0302e7609b5a7b7946a5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.44
 
+  *) Always emit Vary header if mod_deflate is involved in the
+     request.  [AndréMalo <nd@perlig.de>]
+
   *) mod_isapi: Stop unsetting the 'empty' query string result with
      a NULL argument in ecb->lpszQueryString, eliminating segfaults
      for some ISAPI modules.  PR 14399
index 0425a78df0690c422810c8c49b2e10c1f350ca77..bbb66d2cce5ad9d8506d60cf95a6520d3912e880 100644 (file)
@@ -306,6 +306,12 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
             }
         }
 
+        /* Even if we don't accept this request based on it not having
+         * the Accept-Encoding, we need to note that we were looking
+         * for this header and downstream proxies should be aware of that.
+         */
+        apr_table_setn(r->headers_out, "Vary", "Accept-Encoding");
+
         /* if they don't have the line, then they can't play */
         accepts = apr_table_get(r->headers_in, "Accept-Encoding");
         if (accepts == NULL) {
@@ -369,7 +375,6 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
         else {
             apr_table_mergen(r->headers_out, "Content-Encoding", "gzip");
         }
-        apr_table_setn(r->headers_out, "Vary", "Accept-Encoding");
         apr_table_unset(r->headers_out, "Content-Length");
 
         /* initialize deflate output buffer */