diff src/http/ngx_http_request.c @ 326:8733703a37f3

nginx-0.0.3-2004-04-26-00:13:21 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 25 Apr 2004 20:13:21 +0000
parents ba876b26b76d
children fb4dfb2ac0fc
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -991,7 +991,7 @@ void ngx_http_finalize_request(ngx_http_
     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 @@ void ngx_http_close_request(ngx_http_req
         }
     }
 
+    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;