diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2021-11-03 11:22:07 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2021-11-03 11:22:07 +0300 |
commit | bbd05ae252bce1907173d13c6e48d1bed71cd9ea (patch) | |
tree | 6bca56a91f1d0a0b1c3ad4ac0d3c3ba2b4122468 /src/os/unix | |
parent | 8f8cb92e9229d75ea5816f35c6b4bfdfb253a486 (diff) | |
parent | 3334585539168947650a37d74dd32973ab451d70 (diff) | |
download | nginx-bbd05ae252bce1907173d13c6e48d1bed71cd9ea.tar.gz nginx-bbd05ae252bce1907173d13c6e48d1bed71cd9ea.zip |
Merged with the default branch.
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_linux_sendfile_chain.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c index 5695839b0..91e7f1d93 100644 --- a/src/os/unix/ngx_linux_sendfile_chain.c +++ b/src/os/unix/ngx_linux_sendfile_chain.c @@ -38,6 +38,9 @@ static void ngx_linux_sendfile_thread_handler(void *data, ngx_log_t *log); * On Linux up to 2.6.16 sendfile() does not allow to pass the count parameter * more than 2G-1 bytes even on 64-bit platforms: it returns EINVAL, * so we limit it to 2G-1 bytes. + * + * On Linux 2.6.16 and later, sendfile() silently limits the count parameter + * to 2G minus the page size, even on 64-bit platforms. */ #define NGX_SENDFILE_MAXSIZE 2147483647L @@ -216,7 +219,6 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) */ send = prev_send + sent; - continue; } if (send >= limit || in == NULL) { |