Skip to content

Commit f329630

Browse files
committed
fixed:enable flag does not work in download
1 parent 7fbed99 commit f329630

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

XEngine_Source/XEngine_StorageApp/StorageApp_Download.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,16 @@ bool XEngine_Task_HttpDownload(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in
266266
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("下载客户端:%s,请求文件失败,可能BUCKET:%s 不正确,错误:%lX"), lpszClientAddr, pSt_HTTPParam->tszHttpUri, StorageHelp_GetLastError());
267267
return false;
268268
}
269+
if (!st_StorageBucket.bEnable)
270+
{
271+
st_HDRParam.bIsClose = true;
272+
st_HDRParam.nHttpCode = 404;
273+
274+
HttpProtocol_Server_SendMsgEx(xhDLHttp, tszSDBuffer, &nSDLen, &st_HDRParam);
275+
XEngine_Net_SendMsg(lpszClientAddr, tszSDBuffer, nSDLen, STORAGE_NETTYPE_HTTPDOWNLOAD);
276+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("下载客户端:%s,请求文件失败,请求的BUCKET:%s 已经被禁用"), lpszClientAddr, st_StorageBucket.tszBuckKey);
277+
return false;
278+
}
269279
int nPathType = 0;
270280
_xstprintf(tszFileDir, _X("%s%s"), st_StorageBucket.tszFilePath, st_StorageBucket.tszFileName);
271281
BaseLib_OperatorString_GetPath(tszFileDir, &nPathType);

0 commit comments

Comments
 (0)