From 4f630b1213be2c28a02befafe12c225f4d297666 Mon Sep 17 00:00:00 2001 From: Peng Date: Tue, 15 Oct 2013 20:28:55 +0800 Subject: [PATCH] Fix Content-Range generation bug (cherry picked from commit 9f444a680e4f15cd670b94591406ddd3f2fbcf0b) --- upnp/src/genlib/net/http/webserver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upnp/src/genlib/net/http/webserver.c b/upnp/src/genlib/net/http/webserver.c index dbecfb0..0bd0f84 100644 --- a/upnp/src/genlib/net/http/webserver.c +++ b/upnp/src/genlib/net/http/webserver.c @@ -867,8 +867,8 @@ static int CreateHTTPRangeResponseHeader( sizeof(Instr->RangeHeader), "CONTENT-RANGE: bytes %" PRId64 "-%" PRId64 "/%" PRId64 "\r\n", - (int64_t)(FileLength - LastByte + 1), - (int64_t)FileLength, + (int64_t)(FileLength - LastByte), + (int64_t)FileLength - 1, (int64_t)FileLength); } if (rc < 0 || (unsigned int) rc >= sizeof(Instr->RangeHeader)) {