Mercurial > hg > nginx
comparison src/http/modules/ngx_http_gzip_static_module.c @ 3135:784126370092
nginx always sent "Vary: Accept-Encoding",
if both gzip_static and gzip_vary were on
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 15 Sep 2009 11:57:29 +0000 |
parents | c7d57b539248 |
children | 975f0558aab3 44df6e76c28b |
comparison
equal
deleted
inserted
replaced
3134:e6f5cb5eff8b | 3135:784126370092 |
---|---|
93 return NGX_DECLINED; | 93 return NGX_DECLINED; |
94 } | 94 } |
95 | 95 |
96 gzcf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_static_module); | 96 gzcf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_static_module); |
97 | 97 |
98 if (!gzcf->enable || ngx_http_gzip_ok(r) != NGX_OK) { | 98 if (!gzcf->enable) { |
99 return NGX_DECLINED; | |
100 } | |
101 | |
102 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | |
103 | |
104 if (clcf->gzip_vary && ngx_http_gzip_ok(r) != NGX_OK) { | |
99 return NGX_DECLINED; | 105 return NGX_DECLINED; |
100 } | 106 } |
101 | 107 |
102 log = r->connection->log; | 108 log = r->connection->log; |
103 | 109 |
113 | 119 |
114 path.len = p - path.data; | 120 path.len = p - path.data; |
115 | 121 |
116 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, | 122 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, |
117 "http filename: \"%s\"", path.data); | 123 "http filename: \"%s\"", path.data); |
118 | |
119 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | |
120 | 124 |
121 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); | 125 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); |
122 | 126 |
123 of.directio = clcf->directio; | 127 of.directio = clcf->directio; |
124 of.valid = clcf->open_file_cache_valid; | 128 of.valid = clcf->open_file_cache_valid; |
136 | 140 |
137 case NGX_ENOENT: | 141 case NGX_ENOENT: |
138 case NGX_ENOTDIR: | 142 case NGX_ENOTDIR: |
139 case NGX_ENAMETOOLONG: | 143 case NGX_ENAMETOOLONG: |
140 | 144 |
145 r->gzip = 0; | |
141 return NGX_DECLINED; | 146 return NGX_DECLINED; |
142 | 147 |
143 case NGX_EACCES: | 148 case NGX_EACCES: |
144 | 149 |
145 level = NGX_LOG_ERR; | 150 level = NGX_LOG_ERR; |