Mercurial > hg > nginx
diff src/http/ngx_http_header_filter_module.c @ 3313:118169a8ec92
refactor gzip_vary handling
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 12 Nov 2009 13:41:56 +0000 |
parents | 507fc5ac9839 |
children | 616da2ea901f 667c22171519 |
line wrap: on
line diff
--- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -399,8 +399,13 @@ ngx_http_header_filter(ngx_http_request_ } #if (NGX_HTTP_GZIP) - if (r->gzip && clcf->gzip_vary) { - len += sizeof("Vary: Accept-Encoding" CRLF) - 1; + if (r->gzip_vary) { + if (clcf->gzip_vary) { + len += sizeof("Vary: Accept-Encoding" CRLF) - 1; + + } else { + r->gzip_vary = 0; + } } #endif @@ -559,7 +564,7 @@ ngx_http_header_filter(ngx_http_request_ } #if (NGX_HTTP_GZIP) - if (r->gzip && clcf->gzip_vary) { + if (r->gzip_vary) { b->last = ngx_cpymem(b->last, "Vary: Accept-Encoding" CRLF, sizeof("Vary: Accept-Encoding" CRLF) - 1); }