comparison src/http/ngx_http_copy_filter_module.c @ 602:c5122335e41d NGINX_0_8_53

nginx 0.8.53 *) Feature: now the "error_page" directive allows to change a status code in a redirect. *) Feature: the "gzip_disable" directive supports special "degradation" mask. *) Bugfix: a socket leak might occurred if file AIO was used. Thanks to Maxim Dounin. *) Bugfix: if the first server had no "listen" directive and there was no explicit default server, then a next server with a "listen" directive became the default server; the bug had appeared in 0.8.21.
author Igor Sysoev <http://sysoev.ru>
date Mon, 18 Oct 2010 00:00:00 +0400
parents 8246d8a2c2be
children
comparison
equal deleted inserted replaced
601:b2afd36d87f4 602:c5122335e41d
116 116
117 ctx->output_filter = (ngx_output_chain_filter_pt) ngx_http_next_filter; 117 ctx->output_filter = (ngx_output_chain_filter_pt) ngx_http_next_filter;
118 ctx->filter_ctx = r; 118 ctx->filter_ctx = r;
119 119
120 #if (NGX_HAVE_FILE_AIO) 120 #if (NGX_HAVE_FILE_AIO)
121 if (ngx_file_aio && clcf->aio) { 121 if (ngx_file_aio) {
122 ctx->aio_handler = ngx_http_copy_aio_handler; 122 if (clcf->aio) {
123 ctx->aio_handler = ngx_http_copy_aio_handler;
124 }
123 #if (NGX_HAVE_AIO_SENDFILE) 125 #if (NGX_HAVE_AIO_SENDFILE)
124 c->aio_sendfile = (clcf->aio == NGX_HTTP_AIO_SENDFILE); 126 c->aio_sendfile = (clcf->aio == NGX_HTTP_AIO_SENDFILE);
125 #endif 127 #endif
126 } 128 }
127 #endif 129 #endif
209 file->aio->data = r; 211 file->aio->data = r;
210 file->aio->handler = ngx_http_copy_aio_event_handler; 212 file->aio->handler = ngx_http_copy_aio_event_handler;
211 213
212 r->main->blocked++; 214 r->main->blocked++;
213 r->aio = 1; 215 r->aio = 1;
216 ctx->aio = 1;
214 } 217 }
215 218
216 219
217 static void 220 static void
218 ngx_http_copy_aio_event_handler(ngx_event_t *ev) 221 ngx_http_copy_aio_event_handler(ngx_event_t *ev)