[git commit] httpd: emit correct content length on range requests past the end. Closes 4952
Denys Vlasenko
vda.linux at googlemail.com
Tue Apr 3 06:09:28 UTC 2012
commit: http://git.busybox.net/busybox/commit/?id=7a4269329fa05411b477b540beebf18af90e9b42
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Rob Walker <rwalker at codeaurora.org>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/httpd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/networking/httpd.c b/networking/httpd.c
index f233cb0..fb6ecbf 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)
}
range_len = MAXINT(off_t);
if (range_start >= 0) {
- if (!range_end) {
+ if (!range_end || range_end > file_size - 1) {
range_end = file_size - 1;
}
if (range_end < range_start
More information about the busybox-cvs
mailing list