Mercurial > hg > nginx-mail
diff src/http/ngx_http_copy_filter_module.c @ 665:0b460e61bdcd default tip
Merge with nginx 1.0.0.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:22:17 +0400 |
parents | c5122335e41d |
children |
line wrap: on
line diff
--- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c @@ -118,15 +118,19 @@ ngx_http_copy_filter(ngx_http_request_t ctx->filter_ctx = r; #if (NGX_HAVE_FILE_AIO) - if (clcf->aio) { - ctx->aio_handler = ngx_http_copy_aio_handler; + if (ngx_file_aio) { + if (clcf->aio) { + ctx->aio_handler = ngx_http_copy_aio_handler; + } #if (NGX_HAVE_AIO_SENDFILE) c->aio_sendfile = (clcf->aio == NGX_HTTP_AIO_SENDFILE); #endif } #endif - r->request_output = 1; + if (in && in->buf && ngx_buf_size(in->buf)) { + r->request_output = 1; + } } #if (NGX_HAVE_FILE_AIO) @@ -209,6 +213,7 @@ ngx_http_copy_aio_handler(ngx_output_cha r->main->blocked++; r->aio = 1; + ctx->aio = 1; }