error status codes could be cached for next request only,

the bug has been introduced in r3712
This commit is contained in:
Igor Sysoev 2010-08-04 12:55:27 +00:00
parent a589d16bf0
commit e597feff7d

View file

@ -927,10 +927,13 @@ ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf)
} }
if (c->error) { if (c->error) {
fcn->valid_sec = c->valid_sec;
fcn->valid_msec = c->valid_msec;
fcn->error = c->error; 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) { } else if (!fcn->exists && fcn->count == 0 && c->min_uses == 1) {
ngx_queue_remove(&fcn->queue); ngx_queue_remove(&fcn->queue);
ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node); ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node);