Mercurial > hg > nginx
comparison src/http/modules/ngx_http_gzip_static_module.c @ 3312:dddca6f42e7b
nginx sent gzipped responses to clients those do not support gzip,
if "gzip_static on" and "gzip_vary off"; the bug had been introduced in r3136
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Nov 2009 21:12:41 +0000 |
parents | 975f0558aab3 |
children | 118169a8ec92 |
comparison
equal
deleted
inserted
replaced
3311:a394b30b18dd | 3312:dddca6f42e7b |
---|---|
97 | 97 |
98 if (!gzcf->enable) { | 98 if (!gzcf->enable) { |
99 return NGX_DECLINED; | 99 return NGX_DECLINED; |
100 } | 100 } |
101 | 101 |
102 rc = ngx_http_gzip_ok(r); | |
103 | |
102 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 104 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
103 | 105 |
104 if (clcf->gzip_vary && ngx_http_gzip_ok(r) != NGX_OK) { | 106 if (!clcf->gzip_vary && rc != NGX_OK) { |
105 return NGX_DECLINED; | 107 return NGX_DECLINED; |
106 } | 108 } |
107 | 109 |
108 log = r->connection->log; | 110 log = r->connection->log; |
109 | 111 |
161 "%s \"%s\" failed", of.failed, path.data); | 163 "%s \"%s\" failed", of.failed, path.data); |
162 | 164 |
163 return NGX_DECLINED; | 165 return NGX_DECLINED; |
164 } | 166 } |
165 | 167 |
168 if (rc != NGX_OK) { | |
169 return NGX_DECLINED; | |
170 } | |
171 | |
166 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http static fd: %d", of.fd); | 172 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http static fd: %d", of.fd); |
167 | 173 |
168 if (of.is_dir) { | 174 if (of.is_dir) { |
169 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "http dir"); | 175 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "http dir"); |
170 return NGX_DECLINED; | 176 return NGX_DECLINED; |