diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-08-04 12:55:27 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-08-04 12:55:27 +0000 |
commit | 2b74841a4f8301e7b3d3af91d220240a3c6e5d34 (patch) | |
tree | f006217539ccbc646efbc3ffcbd4f3b4e28bd18d /src/http/ngx_http_file_cache.c | |
parent | 541d8c698ac816a603e6959c3cb97445c3374f5a (diff) | |
download | nginx-2b74841a4f8301e7b3d3af91d220240a3c6e5d34.tar.gz nginx-2b74841a4f8301e7b3d3af91d220240a3c6e5d34.zip |
error status codes could be cached for next request only,
the bug has been introduced in r3712
Diffstat (limited to 'src/http/ngx_http_file_cache.c')
-rw-r--r-- | src/http/ngx_http_file_cache.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c index 94ddbf697..c9ecdedb5 100644 --- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -927,10 +927,13 @@ ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf) } if (c->error) { - fcn->valid_sec = c->valid_sec; - fcn->valid_msec = c->valid_msec; fcn->error = c->error; + if (c->valid_sec) { + fcn->valid_sec = c->valid_sec; + fcn->valid_msec = c->valid_msec; + } + } else if (!fcn->exists && fcn->count == 0 && c->min_uses == 1) { ngx_queue_remove(&fcn->queue); ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node); |