fix "stalled cache updating" alert,

when non-cachable HEAD response did not not free an expired cache node
This commit is contained in:
Igor Sysoev 2011-06-01 08:02:34 +00:00
parent e9041dd12c
commit 1788ec0c48

View File

@ -2031,6 +2031,15 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u)
c->error = 1; c->error = 1;
} else { } 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); ngx_http_upstream_finalize_request(r, u, rc);
return; return;
} }