nginx-0.0.3-2004-04-26-00:13:21 import
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 1697eef..1e03621 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -991,7 +991,7 @@
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
if (!ngx_terminate
- && !ngx_quit
+ && !ngx_exiting
&& r->keepalive != 0
&& clcf->keepalive_timeout > 0)
{
@@ -1582,6 +1582,19 @@
}
}
+ if (r->request_body
+ && r->request_body->temp_file
+ && r->request_body->temp_file->file.fd != NGX_INVALID_FILE)
+ {
+ if (ngx_close_file(r->request_body->temp_file->file.fd)
+ == NGX_FILE_ERROR)
+ {
+ ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
+ ngx_close_file_n " deleted file \"%s\" failed",
+ r->request_body->temp_file->file.name.data);
+ }
+ }
+
/* ctx->url was allocated from r->pool */
ctx = log->data;
ctx->url = NULL;