Mercurial > hg > nginx
diff src/http/ngx_http_copy_filter_module.c @ 3119:4c90c9129a82
fix case when the output filter should add incoming buffers
while waiting on file AIO completion
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 13 Sep 2009 06:28:17 +0000 |
parents | c09bf4a53b79 |
children | 04cfc09b8b8d |
line wrap: on
line diff
--- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c @@ -87,10 +87,6 @@ ngx_http_copy_filter(ngx_http_request_t c = r->connection; - if (r->aio) { - return NGX_AGAIN; - } - ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "http copy filter: \"%V?%V\"", &r->uri, &r->args); @@ -123,7 +119,7 @@ ngx_http_copy_filter(ngx_http_request_t #if (NGX_HAVE_FILE_AIO) if (clcf->aio) { - ctx->aio = ngx_http_copy_aio_handler; + ctx->aio_handler = ngx_http_copy_aio_handler; #if (NGX_HAVE_AIO_SENDFILE) c->aio_sendfile = (clcf->aio == NGX_HTTP_AIO_SENDFILE); #endif @@ -133,6 +129,10 @@ ngx_http_copy_filter(ngx_http_request_t r->request_output = 1; } +#if (NGX_HAVE_FILE_AIO) + ctx->aio = r->aio; +#endif + for ( ;; ) { rc = ngx_output_chain(ctx, in);