Mercurial > hg > nginx
diff src/http/ngx_http_write_filter.c @ 399:4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 25 Jul 2004 18:34:14 +0000 |
parents | 6f3b20c1ac50 |
children | f209f3391020 |
line wrap: on
line diff
--- a/src/http/ngx_http_write_filter.c +++ b/src/http/ngx_http_write_filter.c @@ -7,9 +7,6 @@ typedef struct { ngx_chain_t *out; - - /* unsigned flush:1; */ - ngx_uint_t flush; } ngx_http_write_filter_ctx_t; @@ -119,7 +116,7 @@ ngx_int_t ngx_http_write_filter(ngx_http return NGX_AGAIN; } - if (size == 0 && !ctx->flush) { + if (size == 0 && !c->buffered) { if (!last) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, "the http output chain is empty"); @@ -146,19 +143,13 @@ ngx_int_t ngx_http_write_filter(ngx_http return NGX_ERROR; } - if (chain == NGX_CHAIN_AGAIN) { - ctx->out = NULL; - ctx->flush = 1; + ctx->out = chain; + + if (chain || c->buffered) { return NGX_AGAIN; } - ctx->out = chain; - - if (chain == NULL) { - return NGX_OK; - } - - return NGX_AGAIN; + return NGX_OK; }