From: Justin Erenkrantz Date: Sun, 10 Nov 2002 06:09:20 +0000 (+0000) Subject: Always emit Vary header if mod_deflate is involved in the request. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2895cd485ece2f8188965140ca7ac4efeb882271;p=thirdparty%2Fapache%2Fhttpd.git Always emit Vary header if mod_deflate is involved in the request. Submitted by: Andr��Malo Reviewed by: Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97473 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 60f6573a365..9ed42633642 100644 --- 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 ] + *) mod_isapi: Stop unsetting the 'empty' query string result with a NULL argument in ecb->lpszQueryString, eliminating segfaults for some ISAPI modules. PR 14399 diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 0425a78df06..bbb66d2cce5 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -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 */