]> git.kaiwu.me - nginx.git/commit
Fix for proxy_store leaving temporary files for subrequests.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 13 Feb 2012 15:28:19 +0000 (15:28 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 13 Feb 2012 15:28:19 +0000 (15:28 +0000)
commit01c133cda41fd6c9e0b1bcdfad5739a272107ff0
tree68477f4d9ee91e1d664c42529d7d4e392ec1e8d5
parent71ce7a13edff6180702f4982d6fb5744c9b81d5e
Fix for proxy_store leaving temporary files for subrequests.

Temporary files might not be removed if the "proxy_store" or "fastcgi_store"
directives were used for subrequests (e.g. ssi includes) and client closed
connection prematurely.

Non-active subrequests are finalized out of the control of the upstream
module when client closes a connection.  As a result, the code to remove
unfinished temporary files in ngx_http_upstream_process_request() wasn't
executed.

Fix is to move relevant code into ngx_http_upstream_finalize_request() which
is called in all cases, either directly or via the cleanup handler.
src/http/ngx_http_upstream.c