]> git.kaiwu.me - nginx.git/commitdiff
always update an aio_senfile connection flag accodring to a current
authorIgor Sysoev <igor@sysoev.ru>
Tue, 12 Oct 2010 12:18:39 +0000 (12:18 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 12 Oct 2010 12:18:39 +0000 (12:18 +0000)
location configuration, this clears the flag for requests passed
via a keep-alive connection

src/http/ngx_http_copy_filter_module.c

index 2dd4a627bf23c1e12de3b6590ba4d24623191a7a..2eb6487d81b2b162a87b5c6effa75459eb59704d 100644 (file)
@@ -118,8 +118,10 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in)
         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