# HG changeset patch # User Pascal Bellard # Date 1506503774 -7200 # Node ID cec701c81209d7664608e58d2a31c439512ff744 # Parent 3b73c6c5ad407619323f26f9559cad3bf48dc579 busybox/httpd: fix handling of range requests diff -r 3b73c6c5ad40 -r cec701c81209 busybox/receipt --- a/busybox/receipt Mon Sep 25 10:43:18 2017 +0200 +++ b/busybox/receipt Wed Sep 27 11:16:14 2017 +0200 @@ -47,6 +47,7 @@ scriptreplay.u mkfs_vfat.u ash.u +httpd.u EOT cp $stuff/$PACKAGE-${VERSION%.*}.config .config } diff -r 3b73c6c5ad40 -r cec701c81209 busybox/stuff/busybox-1.27-httpd.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.27-httpd.u Wed Sep 27 11:16:14 2017 +0200 @@ -0,0 +1,26 @@ +From 2b400d9b2b7309d6e479102fc3ce646e893058a5 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Mon, 18 Sep 2017 13:09:11 +0200 +Subject: httpd: fix handling of range requests + +Signed-off-by: Denys Vlasenko +--- + networking/httpd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/networking/httpd.c b/networking/httpd.c +index e072f23..5e32fc9 100644 +--- a/networking/httpd.c ++++ b/networking/httpd.c +@@ -2337,7 +2337,7 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) + if (STRNCASECMP(iobuf, "Range:") == 0) { + /* We know only bytes=NNN-[MMM] */ + char *s = skip_whitespace(iobuf + sizeof("Range:")-1); +- if (is_prefixed_with(s, "bytes=") == 0) { ++ if (is_prefixed_with(s, "bytes=")) { + s += sizeof("bytes=")-1; + range_start = BB_STRTOOFF(s, &s, 10); + if (s[0] != '-' || range_start < 0) { +-- +cgit v0.12 +