diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-01-25 08:45:04 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-01-25 08:45:04 +0000 |
| commit | cd5b99a0450ea5c6bdf8a40d607760d93b1c1190 (patch) | |
| tree | 90561613d8ae962ab9f5f96c652ffe315b030f83 /src/core/ngx_palloc.c | |
| parent | 3a58cc90b5f7cd10e8dcb50abddb8d1218b32746 (diff) | |
| download | nginx-cd5b99a0450ea5c6bdf8a40d607760d93b1c1190.tar.gz nginx-cd5b99a0450ea5c6bdf8a40d607760d93b1c1190.tar.bz2 | |
undo "client_body_in_file_only any"
and introduce "client_body_in_file_only clean"
introduce ngx_pool_delete_file() to not break a possible third-party
ngx_pool_cleanup_file() usage that may lead to an removal of the useful files
delete unnecessary ngx_http_finalize_request_body()
Diffstat (limited to 'src/core/ngx_palloc.c')
| -rw-r--r-- | src/core/ngx_palloc.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/ngx_palloc.c b/src/core/ngx_palloc.c index 109b6e3cc..4288bf10a 100644 --- a/src/core/ngx_palloc.c +++ b/src/core/ngx_palloc.c @@ -243,6 +243,32 @@ ngx_pool_cleanup_file(void *data) } +void +ngx_pool_delete_file(void *data) +{ + ngx_pool_cleanup_file_t *c = data; + + ngx_err_t err; + + ngx_log_debug3(NGX_LOG_DEBUG_ALLOC, c->log, 0, "run cleanup: %p, fd:%d %s", + c, c->fd, c->name); + + if (ngx_delete_file(c->name) == NGX_FILE_ERROR) { + err = ngx_errno; + + if (err != NGX_ENOENT) { + ngx_log_error(NGX_LOG_CRIT, c->log, err, + ngx_delete_file_n " \"%s\" failed", c->name); + } + } + + if (ngx_close_file(c->fd) == NGX_FILE_ERROR) { + ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, + ngx_close_file_n " \"%s\" failed", c->name); + } +} + + #if 0 static void * |
