Skip to content

Commit c14476e

Browse files
committed
fixed:http restful api handle error
1 parent b27439f commit c14476e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_HttpTask.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,7 @@ bool XEngine_HTTPTask_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR
112112
//获得方法
113113
if (0 == _tcsxnicmp(lpszMethodPost, pSt_HTTPParam->tszHttpMethod, _tcsxlen(lpszMethodPost)))
114114
{
115-
//获得函数名
116-
BaseLib_OperatorString_GetKeyValue(pptszList[0], "=", tszKey, tszValue);
117-
//http://app.xyry.org:5501/api?function=forward&url=http://app.xyry.org
118-
if (0 == _tcsxnicmp(lpszFunctionStr, tszKey, _tcsxlen(lpszFunctionStr)))
119-
{
120-
HTTPApi_Management_Task(lpszClientAddr, &pptszList, nListCount);
121-
}
122-
else if (0 == _tcsxnicmp(lpszFunRtc, tszAPIType, _tcsxlen(lpszFunRtc)))
115+
if (0 == _tcsxnicmp(lpszFunRtc, tszAPIType, _tcsxlen(lpszFunRtc)))
123116
{
124117
PullStream_ClientWebRtc_Handle(pSt_HTTPParam, lpszClientAddr, lpszMsgBuffer, nMsgLen);
125118
}
@@ -128,7 +121,14 @@ bool XEngine_HTTPTask_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR
128121
{
129122
//获得函数名
130123
BaseLib_OperatorString_GetKeyValue(pptszList[0], "=", tszKey, tszValue);
131-
if (0 == _tcsxnicmp(lpszStreamStr, tszKey, _tcsxlen(lpszStreamStr)))
124+
125+
//获得函数名
126+
//http://app.xyry.org:5501/api?function=forward&url=http://app.xyry.org
127+
if (0 == _tcsxnicmp(lpszFunctionStr, tszKey, _tcsxlen(lpszFunctionStr)))
128+
{
129+
HTTPApi_Management_Task(lpszClientAddr, &pptszList, nListCount);
130+
}
131+
else if (0 == _tcsxnicmp(lpszStreamStr, tszKey, _tcsxlen(lpszStreamStr)))
132132
{
133133
//如果是拉流请求
134134
PullStream_ClientGet_Handle(lpszClientAddr, &pptszList, nListCount);

0 commit comments

Comments
 (0)