preload just a single byte to avoid testing file overrun
This commit is contained in:
parent
add85d5506
commit
c8e1886c35
2 changed files with 2 additions and 2 deletions
|
@ -171,7 +171,7 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
||||||
c->busy_sendfile = NULL;
|
c->busy_sendfile = NULL;
|
||||||
e = (ngx_http_ephemeral_t *) &r->uri_start;
|
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) {
|
if (n > 0) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -547,7 +547,7 @@ struct ngx_http_request_s {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ngx_http_posted_request_t terminal_posted_request;
|
ngx_http_posted_request_t terminal_posted_request;
|
||||||
#if (NGX_HAVE_AIO_SENDFILE)
|
#if (NGX_HAVE_AIO_SENDFILE)
|
||||||
u_char preload[4];
|
u_char aio_preload;
|
||||||
#endif
|
#endif
|
||||||
} ngx_http_ephemeral_t;
|
} ngx_http_ephemeral_t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue