Mercurial > hg > nginx-ranges
diff src/http/modules/ngx_http_gzip_static_module.c @ 540:005a70f9573b NGINX_0_8_16
nginx 0.8.16
*) Feature: the "image_filter_transparency" directive.
*) Bugfix: "addition_types" directive was incorrectly named
"addtion_types".
*) Bugfix: resolver cache poisoning.
Thanks to Matthew Dempsky.
*) Bugfix: memory leak in resolver.
Thanks to Matthew Dempsky.
*) Bugfix: invalid request line in $request variable was written in
access_log only if error_log was set to "info" or "debug" level.
*) Bugfix: in PNG alpha-channel support in the
ngx_http_image_filter_module.
*) Bugfix: nginx always added "Vary: Accept-Encoding" response header
line, if both "gzip_static" and "gzip_vary" were on.
*) Bugfix: in UTF-8 encoding support by "try_files" directive in
nginx/Windows.
*) Bugfix: in "post_action" directive usage; the bug had appeared in
0.8.11.
Thanks to Igor Artemiev.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 22 Sep 2009 00:00:00 +0400 |
parents | f39b9e29530d |
children | f7ec98e3caeb |
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 @@ -95,7 +95,13 @@ ngx_http_gzip_static_handler(ngx_http_re gzcf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_static_module); - if (!gzcf->enable || ngx_http_gzip_ok(r) != NGX_OK) { + if (!gzcf->enable) { + return NGX_DECLINED; + } + + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + + if (clcf->gzip_vary && ngx_http_gzip_ok(r) != NGX_OK) { return NGX_DECLINED; } @@ -116,8 +122,6 @@ ngx_http_gzip_static_handler(ngx_http_re ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http filename: \"%s\"", path.data); - clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); - ngx_memzero(&of, sizeof(ngx_open_file_info_t)); of.directio = clcf->directio; @@ -138,6 +142,7 @@ ngx_http_gzip_static_handler(ngx_http_re case NGX_ENOTDIR: case NGX_ENAMETOOLONG: + r->gzip = 0; return NGX_DECLINED; case NGX_EACCES: