wok rev 20077

busybox/httpd: fix handling of range requests
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 27 11:16:14 2017 +0200 (2017-09-27)
parents 3b73c6c5ad40
children 88f2b120ccee
files busybox/receipt busybox/stuff/busybox-1.27-httpd.u
line diff
     1.1 --- a/busybox/receipt	Mon Sep 25 10:43:18 2017 +0200
     1.2 +++ b/busybox/receipt	Wed Sep 27 11:16:14 2017 +0200
     1.3 @@ -47,6 +47,7 @@
     1.4  scriptreplay.u
     1.5  mkfs_vfat.u
     1.6  ash.u
     1.7 +httpd.u
     1.8  EOT
     1.9      cp $stuff/$PACKAGE-${VERSION%.*}.config .config
    1.10  }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/busybox/stuff/busybox-1.27-httpd.u	Wed Sep 27 11:16:14 2017 +0200
     2.3 @@ -0,0 +1,26 @@
     2.4 +From 2b400d9b2b7309d6e479102fc3ce646e893058a5 Mon Sep 17 00:00:00 2001
     2.5 +From: Denys Vlasenko <vda.linux@googlemail.com>
     2.6 +Date: Mon, 18 Sep 2017 13:09:11 +0200
     2.7 +Subject: httpd: fix handling of range requests
     2.8 +
     2.9 +Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
    2.10 +---
    2.11 + networking/httpd.c | 2 +-
    2.12 + 1 file changed, 1 insertion(+), 1 deletion(-)
    2.13 +
    2.14 +diff --git a/networking/httpd.c b/networking/httpd.c
    2.15 +index e072f23..5e32fc9 100644
    2.16 +--- a/networking/httpd.c
    2.17 ++++ b/networking/httpd.c
    2.18 +@@ -2337,7 +2337,7 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
    2.19 + 			if (STRNCASECMP(iobuf, "Range:") == 0) {
    2.20 + 				/* We know only bytes=NNN-[MMM] */
    2.21 + 				char *s = skip_whitespace(iobuf + sizeof("Range:")-1);
    2.22 +-				if (is_prefixed_with(s, "bytes=") == 0) {
    2.23 ++				if (is_prefixed_with(s, "bytes=")) {
    2.24 + 					s += sizeof("bytes=")-1;
    2.25 + 					range_start = BB_STRTOOFF(s, &s, 10);
    2.26 + 					if (s[0] != '-' || range_start < 0) {
    2.27 +-- 
    2.28 +cgit v0.12
    2.29 +