From 1788ec0c48105b1744fb8c22adcaafb90d46eba1 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 1 Jun 2011 08:02:34 +0000 Subject: [PATCH] fix "stalled cache updating" alert, when non-cachable HEAD response did not not free an expired cache node --- src/http/ngx_http_upstream.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 8f1ee42c3..22187a5e6 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2031,6 +2031,15 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) c->error = 1; } else { + +#if (NGX_HTTP_CACHE) + + if (r->cache) { + ngx_http_file_cache_free(r->cache, u->pipe->temp_file); + } + +#endif + ngx_http_upstream_finalize_request(r, u, rc); return; }