Skip to content

Commit 39a4a6c

Browse files
committed
fixed:big file upload boundary file is incorrect
1 parent cd125eb commit 39a4a6c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

XEngine_Source/XEngine_StorageApp/StorageApp_UPLoader.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ bool XEngine_Task_HttpUPLoader(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in
286286
int nPos = 0;
287287
if (Algorithm_String_XFastMatch(lpszMsgBuffer, st_StorageInfo.st_Boundary.tszBoundStr, &nPos, nMsgLen))
288288
{
289-
Session_UPStroage_Write(lpszClientAddr, lpszMsgBuffer, nPos);
289+
int nRLen = _tcsxlen(st_StorageInfo.st_Boundary.tszBoundStr) + 3;
290+
Session_UPStroage_Write(lpszClientAddr, lpszMsgBuffer, nPos - nRLen);
290291
}
291292
else
292293
{
@@ -302,8 +303,8 @@ bool XEngine_Task_HttpUPLoader(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in
302303
{
303304
if (Algorithm_String_XFastMatch(lpszMsgBuffer + nPosStart, st_StorageInfo.st_Boundary.tszBoundStr, &nPosEnd, nMsgLen - nPosStart))
304305
{
305-
int nRLen = _tcsxlen(st_StorageInfo.st_Boundary.tszBoundStr);
306-
Session_UPStroage_Write(lpszClientAddr, lpszMsgBuffer + nPosStart, nPosEnd - nRLen - 3);
306+
int nRLen = _tcsxlen(st_StorageInfo.st_Boundary.tszBoundStr) + 3;
307+
Session_UPStroage_Write(lpszClientAddr, lpszMsgBuffer + nPosStart, nPosEnd - nRLen);
307308
}
308309
else
309310
{

0 commit comments

Comments
 (0)