Mercurial > hg > nginx-ranges
diff src/http/ngx_http_copy_filter_module.c @ 537:0161f3197817 NGINX_0_8_15
nginx 0.8.15
*) Security: a segmentation fault might occur in worker process while
specially crafted request handling.
Thanks to Chris Ries.
*) Bugfix: if names .domain.tld, .sub.domain.tld, and .domain-some.tld
were defined, then the name .sub.domain.tld was matched by
.domain.tld.
*) Bugfix: in transparency support in the ngx_http_image_filter_module.
*) Bugfix: in file AIO.
*) Bugfix: in X-Accel-Redirect usage; the bug had appeared in 0.8.11.
*) Bugfix: in embedded perl module; the bug had appeared in 0.8.11.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 14 Sep 2009 00:00:00 +0400 |
parents | 80f7156c2965 |
children | 2b9e388c61f1 |
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); @@ -174,6 +174,7 @@ ngx_http_copy_filter(ngx_http_request_t n = ngx_file_aio_read(file, &e->aio_preload, 1, offset, r->pool); if (n > 0) { + in = NULL; continue; }