Mercurial > hg > nginx
changeset 333:be40e9893a19
nginx-0.0.3-2004-05-11-20:16:13 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 11 May 2004 16:16:13 +0000 |
parents | 159dd60d257a |
children | af451db3fe99 |
files | src/core/ngx_cycle.c src/http/ngx_http_write_filter.c src/os/unix/ngx_files.h |
diffstat | 3 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_cycle.c Mon May 10 19:53:35 2004 +0000 +++ b/src/core/ngx_cycle.c Tue May 11 16:16:13 2004 +0000 @@ -469,7 +469,7 @@ file.log = cycle->log; file.fd = ngx_open_file(file.name.data, NGX_FILE_RDWR, - NGX_FILE_CREATE_OR_OPEN); + NGX_FILE_CREATE_OR_OPEN|NGX_FILE_TRUNCATE); if (file.fd == NGX_INVALID_FILE) { ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
--- a/src/http/ngx_http_write_filter.c Mon May 10 19:53:35 2004 +0000 +++ b/src/http/ngx_http_write_filter.c Tue May 11 16:16:13 2004 +0000 @@ -143,8 +143,10 @@ } if (size == 0) { - ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, - "the http output chain is empty"); + if (!last) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + "the http output chain is empty"); + } return NGX_OK; }
--- a/src/os/unix/ngx_files.h Mon May 10 19:53:35 2004 +0000 +++ b/src/os/unix/ngx_files.h Tue May 11 16:16:13 2004 +0000 @@ -19,6 +19,7 @@ #define NGX_FILE_RDWR O_RDWR #define NGX_FILE_CREATE_OR_OPEN O_CREAT #define NGX_FILE_OPEN 0 +#define NGX_FILE_TRUNCATE O_TRUNC #define NGX_FILE_APPEND O_APPEND