]> git.kaiwu.me - nginx.git/commitdiff
preload just a single byte to avoid testing file overrun
authorIgor Sysoev <igor@sysoev.ru>
Fri, 4 Sep 2009 16:59:23 +0000 (16:59 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 4 Sep 2009 16:59:23 +0000 (16:59 +0000)
src/http/ngx_http_copy_filter_module.c
src/http/ngx_http_request.h

index 954717d8b4729bac53dbf0d7db2b9196190627ad..8f4002fe38df28fd222e265a98f1f7ee02cbd54c 100644 (file)
@@ -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;
index 2ca2153779f6c43a19fa9584d32e52d41aa16074..3bd70c33c84db41aad5441344b47ea6fecff5a9c 100644 (file)
@@ -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;