# HG changeset patch # User Igor Sysoev # Date 1252083563 0 # Node ID 2f35eeea86c2d1256275e3f387f3bb60f8704bc9 # Parent ffe8bfb38184d1811606ce8b801919983323e75b preload just a single byte to avoid testing file overrun diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c --- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c @@ -171,7 +171,7 @@ ngx_http_copy_filter(ngx_http_request_t 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; diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -547,7 +547,7 @@ struct ngx_http_request_s { 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;