diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-02-04 21:37:17 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-02-04 21:37:17 +0100 |
commit | ef43beac63aa7e4b2bccb069e47b5e4902bb895f (patch) | |
tree | a234390a123a116c6acd0727eeebb9d8c13d6ec5 | |
parent | 9ec3cd400ad9930a8cd3de371271202de49adea9 (diff) | |
download | busybox-w32-ef43beac63aa7e4b2bccb069e47b5e4902bb895f.tar.gz busybox-w32-ef43beac63aa7e4b2bccb069e47b5e4902bb895f.tar.bz2 busybox-w32-ef43beac63aa7e4b2bccb069e47b5e4902bb895f.zip |
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>
-rw-r--r-- | networking/httpd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 0e4c697f8..ba956318c 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1623,7 +1623,7 @@ static NOINLINE void send_file_and_exit(const char *url, int what) | |||
1623 | break; /* fall back to read/write loop */ | 1623 | break; /* fall back to read/write loop */ |
1624 | goto fin; | 1624 | goto fin; |
1625 | } | 1625 | } |
1626 | IF_FEATURE_HTTPD_RANGES(range_len -= sz;) | 1626 | IF_FEATURE_HTTPD_RANGES(range_len -= count;) |
1627 | if (count == 0 || range_len == 0) | 1627 | if (count == 0 || range_len == 0) |
1628 | log_and_exit(); | 1628 | log_and_exit(); |
1629 | } | 1629 | } |