Skip to content

Commit c682403

Browse files
committed
fixed:download resume pos not work
1 parent eb3a8a9 commit c682403

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

XEngine_Source/XEngine_StorageApp/Storage_APPHelp/Storage_APPHelp.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,16 @@ BOOL XEngine_APPHelp_RangeFile(LPCTSTR lpszClientAddr, int* pInt_SPos, int* pInt
133133
//是否有范围
134134
if (!RfcComponents_HttpHelp_GetField(&pptszListHdr, nHdrCount, lpszRange, tszRangeStr))
135135
{
136-
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _T("%s:%s,请求内容没有范围信息"), lpszClientType, lpszClientAddr);
136+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _T("%s:%s,请求内容没有范围信息"), lpszClientType, lpszClientAddr);
137137
return FALSE;
138138
}
139139
//是否没有找到
140-
if (!BaseLib_OperatorString_GetWithChar(tszRangeStr, tszKeyStr, tszValueStr, '-'))
140+
int nBPos = 0; //某些时候有个BYTE
141+
if (NULL != _tcsstr(tszRangeStr,_T("bytes=")))
142+
{
143+
nBPos = 6;
144+
}
145+
if (!BaseLib_OperatorString_GetWithChar(tszRangeStr + nBPos, tszKeyStr, tszValueStr, '-'))
141146
{
142147
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _T("%s:%s,请求内容有范围信息,但是解析失败,内容:%s"), lpszClientType, lpszClientAddr, tszRangeStr);
143148
return FALSE;

0 commit comments

Comments
 (0)