diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-07-25 18:34:14 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-07-25 18:34:14 +0000 |
commit | 0599b11937990b169c05f95eeaed7cf22d823740 (patch) | |
tree | 3e52ebeadd8d0442e33ae96ec0ae9a755aa54696 /src/http | |
parent | a2b360d0b9196a130f9e39184edde69076d906ed (diff) | |
download | nginx-0599b11937990b169c05f95eeaed7cf22d823740.tar.gz nginx-0599b11937990b169c05f95eeaed7cf22d823740.zip |
nginx-0.0.7-2004-07-25-22:34:14 import
Diffstat (limited to 'src/http')
-rw-r--r-- | src/http/ngx_http_write_filter.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/http/ngx_http_write_filter.c b/src/http/ngx_http_write_filter.c index 412d4f9bc..2c0989d0a 100644 --- 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_request_t *r, ngx_chain_t *in) 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_request_t *r, ngx_chain_t *in) return NGX_ERROR; } - if (chain == NGX_CHAIN_AGAIN) { - ctx->out = NULL; - ctx->flush = 1; - return NGX_AGAIN; - } - ctx->out = chain; - if (chain == NULL) { - return NGX_OK; + if (chain || c->buffered) { + return NGX_AGAIN; } - return NGX_AGAIN; + return NGX_OK; } |