Mercurial > hg > nginx-mail
comparison 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 |
comparison
equal
deleted
inserted
replaced
572:06419a2298a9 | 665:0b460e61bdcd |
---|---|
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 (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 |
128 | 130 |
129 r->request_output = 1; | 131 if (in && in->buf && ngx_buf_size(in->buf)) { |
132 r->request_output = 1; | |
133 } | |
130 } | 134 } |
131 | 135 |
132 #if (NGX_HAVE_FILE_AIO) | 136 #if (NGX_HAVE_FILE_AIO) |
133 ctx->aio = r->aio; | 137 ctx->aio = r->aio; |
134 #endif | 138 #endif |
207 file->aio->data = r; | 211 file->aio->data = r; |
208 file->aio->handler = ngx_http_copy_aio_event_handler; | 212 file->aio->handler = ngx_http_copy_aio_event_handler; |
209 | 213 |
210 r->main->blocked++; | 214 r->main->blocked++; |
211 r->aio = 1; | 215 r->aio = 1; |
216 ctx->aio = 1; | |
212 } | 217 } |
213 | 218 |
214 | 219 |
215 static void | 220 static void |
216 ngx_http_copy_aio_event_handler(ngx_event_t *ev) | 221 ngx_http_copy_aio_event_handler(ngx_event_t *ev) |