changeset 3778:d29e8060ca0c

always update an aio_senfile connection flag accodring to a current location configuration, this clears the flag for requests passed via a keep-alive connection
author Igor Sysoev <igor@sysoev.ru>
date Tue, 12 Oct 2010 12:18:39 +0000
parents cd04f652478c
children 57aecfdcac3d
files src/http/ngx_http_copy_filter_module.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_copy_filter_module.c
+++ b/src/http/ngx_http_copy_filter_module.c
@@ -118,8 +118,10 @@ ngx_http_copy_filter(ngx_http_request_t 
         ctx->filter_ctx = r;
 
 #if (NGX_HAVE_FILE_AIO)
-        if (ngx_file_aio && 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