mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-24 04:09:43 +00:00
httpd: fix sendfile of files larger than 2 Gb. Closes 4754
When built with "sendfile" support, httpd was unable to send large files (>2 GB) in one single connection, terminating it before the full file has been sent. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
9ec3cd400a
commit
ef43beac63
@ -1623,7 +1623,7 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
|
||||
break; /* fall back to read/write loop */
|
||||
goto fin;
|
||||
}
|
||||
IF_FEATURE_HTTPD_RANGES(range_len -= sz;)
|
||||
IF_FEATURE_HTTPD_RANGES(range_len -= count;)
|
||||
if (count == 0 || range_len == 0)
|
||||
log_and_exit();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user