]> git.kaiwu.me - nginx.git/commitdiff
fix "stalled cache updating" alert,
authorIgor Sysoev <igor@sysoev.ru>
Wed, 1 Jun 2011 08:02:34 +0000 (08:02 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 1 Jun 2011 08:02:34 +0000 (08:02 +0000)
when non-cachable HEAD response did not not free an expired cache node

src/http/ngx_http_upstream.c

index 8f1ee42c33c939d0f782829c2c3d0e0fc08e01db..22187a5e62bac49c23058d3e41a726dfd9481e98 100644 (file)
@@ -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;
         }