diff options
author | Rob Walker <rwalker@codeaurora.org> | 2012-04-03 08:09:28 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-04-03 08:09:28 +0200 |
commit | 7a4269329fa05411b477b540beebf18af90e9b42 (patch) | |
tree | e55230dad08a9f811f7404dea1f1dafb510d4f62 | |
parent | 1d9e99b399e72763045a2428e04b32278538ccc7 (diff) | |
download | busybox-w32-7a4269329fa05411b477b540beebf18af90e9b42.tar.gz busybox-w32-7a4269329fa05411b477b540beebf18af90e9b42.tar.bz2 busybox-w32-7a4269329fa05411b477b540beebf18af90e9b42.zip |
httpd: emit correct content length on range requests past the end. Closes 4952
Signed-off-by: Rob Walker <rwalker@codeaurora.org>
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 f233cb0ba..fb6ecbf70 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1594,7 +1594,7 @@ static NOINLINE void send_file_and_exit(const char *url, int what) | |||
1594 | } | 1594 | } |
1595 | range_len = MAXINT(off_t); | 1595 | range_len = MAXINT(off_t); |
1596 | if (range_start >= 0) { | 1596 | if (range_start >= 0) { |
1597 | if (!range_end) { | 1597 | if (!range_end || range_end > file_size - 1) { |
1598 | range_end = file_size - 1; | 1598 | range_end = file_size - 1; |
1599 | } | 1599 | } |
1600 | if (range_end < range_start | 1600 | if (range_end < range_start |