修复http文件服务器相关bug

This commit is contained in:
xiongziliang 2021-05-22 09:28:19 +08:00
parent 8cbec43ee8
commit f54e02f511

View File

@ -577,7 +577,7 @@ void HttpResponseInvokerImp::responseFile(const StrCaseMap &requestHeader,
//分节下载
code = 206;
iRangeStart = atoll(FindField(strRange.data(), "bytes=", "-").data());
iRangeEnd = atoll(FindField(strRange.data(), "-", "\r\n").data());
iRangeEnd = atoll(FindField(strRange.data(), "-", nullptr).data());
if (iRangeEnd == 0) {
iRangeEnd = fileSize - 1;
}