comparison src/http/ngx_http_file_cache.c @ 3917:2a70484a6580

fix a broken cached response if bypass/no_cache directive values are different, the bug has been introduced in r3700
author Igor Sysoev <igor@sysoev.ru>
date Fri, 13 May 2011 10:05:38 +0000
parents e7cd13b7f759
children 2e8dbd773d63
comparison
equal deleted inserted replaced
3916:0ec738f18346 3917:2a70484a6580
172 { 172 {
173 ngx_http_cache_t *c; 173 ngx_http_cache_t *c;
174 ngx_pool_cleanup_t *cln; 174 ngx_pool_cleanup_t *cln;
175 ngx_http_file_cache_t *cache; 175 ngx_http_file_cache_t *cache;
176 176
177 ngx_http_file_cache_create_key(r);
178
179 c = r->cache; 177 c = r->cache;
180 cache = c->file_cache; 178 cache = c->file_cache;
181 179
182 cln = ngx_pool_cleanup_add(r->pool, 0); 180 cln = ngx_pool_cleanup_add(r->pool, 0);
183 if (cln == NULL) { 181 if (cln == NULL) {
904 ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf) 902 ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf)
905 { 903 {
906 ngx_http_file_cache_t *cache; 904 ngx_http_file_cache_t *cache;
907 ngx_http_file_cache_node_t *fcn; 905 ngx_http_file_cache_node_t *fcn;
908 906
909 if (c->updated) { 907 if (c->updated || c->node == NULL) {
910 return; 908 return;
911 } 909 }
912 910
913 cache = c->file_cache; 911 cache = c->file_cache;
914 912