Mercurial > hg > nginx
changeset 3084:2f35eeea86c2
preload just a single byte to avoid testing file overrun
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 04 Sep 2009 16:59:23 +0000 |
parents | ffe8bfb38184 |
children | 2f400438466f |
files | src/http/ngx_http_copy_filter_module.c src/http/ngx_http_request.h |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_copy_filter_module.c Fri Sep 04 09:57:38 2009 +0000 +++ b/src/http/ngx_http_copy_filter_module.c Fri Sep 04 16:59:23 2009 +0000 @@ -171,7 +171,7 @@ c->busy_sendfile = NULL; e = (ngx_http_ephemeral_t *) &r->uri_start; - n = ngx_file_aio_read(file, e->preload, 4, offset, r->pool); + n = ngx_file_aio_read(file, e->aio_preload, 1, offset, r->pool); if (n > 0) { continue;
--- a/src/http/ngx_http_request.h Fri Sep 04 09:57:38 2009 +0000 +++ b/src/http/ngx_http_request.h Fri Sep 04 16:59:23 2009 +0000 @@ -547,7 +547,7 @@ typedef struct { ngx_http_posted_request_t terminal_posted_request; #if (NGX_HAVE_AIO_SENDFILE) - u_char preload[4]; + u_char aio_preload; #endif } ngx_http_ephemeral_t;