summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-07-28 15:49:34 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-07-28 15:49:34 +0000
commit406a68003cfc3b9907bd40699c4a51df4cee3a5a (patch)
tree3375c5abfa5b609b71145b2bec2e918dc67b4aa9 /src/http/ngx_http_upstream.c
parent18b36e5035ec5b96fbc44311df5e5dd426d4e93e (diff)
downloadnginx-406a68003cfc3b9907bd40699c4a51df4cee3a5a.tar.gz
nginx-406a68003cfc3b9907bd40699c4a51df4cee3a5a.tar.bz2
several changes in cache cleanup handling:
*) now ngx_http_file_cache_cleanup() uses ngx_http_file_cache_free() *) ngx_http_file_cache_free() interface has been changed to accept r->cache ngx_http_file_cache_cleanup() must use r->cache, but not r, because there can be several r->cache's during request processing, r->cache may be NULL at request finalising, etc. *) test if updating request does not complete correctly
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 93a0e5324..b04b61595 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1735,7 +1735,7 @@ ngx_http_upstream_intercept_errors(ngx_http_request_t *r,
r->cache->error = status;
}
- ngx_http_file_cache_free(r, u->pipe->temp_file);
+ ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
}
#endif
ngx_http_upstream_finalize_request(r, u, status);
@@ -2189,7 +2189,7 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u)
"http cacheable: %d", u->cacheable);
if (u->cacheable == 0 && r->cache) {
- ngx_http_file_cache_free(r, u->pipe->temp_file);
+ ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
}
#endif
@@ -2664,7 +2664,7 @@ ngx_http_upstream_process_request(ngx_http_request_t *r)
ngx_http_file_cache_update(r, u->pipe->temp_file);
} else if (p->upstream_error) {
- ngx_http_file_cache_free(r, u->pipe->temp_file);
+ ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
}
}
@@ -3005,7 +3005,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
}
}
- ngx_http_file_cache_free(r, u->pipe->temp_file);
+ ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
}
#endif