diff src/http/modules/ngx_http_gzip_static_module.c @ 3441:b0fbe6ab9ebe stable-0.7

merge r3309, r3314, r3315, r3380: gzip headers related fixes: *) remove "Content-Encoding: gzip" in 304 response sent by ngx_http_gzip_static_module *) refactor gzip_vary handling *) test r->header_only last, since it's not actually frequent here: 304 and HEAD responses are not set it before the filter
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Feb 2010 15:54:02 +0000
parents 44df6e76c28b
children 8944c3e318ab
line wrap: on
line diff
--- a/src/http/modules/ngx_http_gzip_static_module.c
+++ b/src/http/modules/ngx_http_gzip_static_module.c
@@ -144,7 +144,6 @@ ngx_http_gzip_static_handler(ngx_http_re
         case NGX_ENOTDIR:
         case NGX_ENAMETOOLONG:
 
-            r->gzip = 0;
             return NGX_DECLINED;
 
         case NGX_EACCES:
@@ -164,6 +163,8 @@ ngx_http_gzip_static_handler(ngx_http_re
         return NGX_DECLINED;
     }
 
+    r->gzip_vary = 1;
+
     if (rc != NGX_OK) {
         return NGX_DECLINED;
     }