Fix Content-Range generation bug

This commit is contained in:
Peng 2013-10-15 20:28:55 +08:00 committed by Marcelo Roberto Jimenez
parent 8e3a71905b
commit 9f444a680e

View File

@ -864,8 +864,8 @@ static int CreateHTTPRangeResponseHeader(
sizeof(Instr->RangeHeader), sizeof(Instr->RangeHeader),
"CONTENT-RANGE: bytes %" PRId64 "CONTENT-RANGE: bytes %" PRId64
"-%" PRId64 "/%" PRId64 "\r\n", "-%" PRId64 "/%" PRId64 "\r\n",
(int64_t)(FileLength - LastByte + 1), (int64_t)(FileLength - LastByte),
(int64_t)FileLength, (int64_t)FileLength - 1,
(int64_t)FileLength); (int64_t)FileLength);
} }
if (rc < 0 || (unsigned int) rc >= sizeof(Instr->RangeHeader)) { if (rc < 0 || (unsigned int) rc >= sizeof(Instr->RangeHeader)) {