From a6390ed77ea67937c91d8100f3c7ce7c5bce2402 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 c82383507..74196a4f1 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -2338,7 +2338,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 v1.2.3