diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-09-04 16:59:23 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-09-04 16:59:23 +0000 |
commit | 78fd825c1ec4e67afb2850b36f715d18882e307c (patch) | |
tree | 83254a3abeb5811e79a83622f4dfc5db9620b2c6 /src | |
parent | 8013a830679eeb857015c76bac96968a7605d020 (diff) | |
download | nginx-78fd825c1ec4e67afb2850b36f715d18882e307c.tar.gz nginx-78fd825c1ec4e67afb2850b36f715d18882e307c.zip |
preload just a single byte to avoid testing file overrun
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_copy_filter_module.c | 2 | ||||
-rw-r--r-- | src/http/ngx_http_request.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c index 954717d8b..8f4002fe3 100644 --- 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 *r, ngx_chain_t *in) 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 index 2ca215377..3bd70c33c 100644 --- 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; |