mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
support server cookie
This commit is contained in:
parent
03d9cba043
commit
71cb7bec0b
@ -109,6 +109,9 @@ void AsyncProcThread::callback(ReqMessage * msg)
|
||||
pServantProxyThreadData->_dyeing = msg->bDyeing;
|
||||
pServantProxyThreadData->_dyeingKey = msg->sDyeingKey;
|
||||
|
||||
pServantProxyThreadData->_hasCookie = msg->hasCookie;
|
||||
pServantProxyThreadData->_cookie = msg->cookie;
|
||||
|
||||
if(msg->adapter)
|
||||
{
|
||||
pServantProxyThreadData->_szHost = msg->adapter->endpoint().desc();
|
||||
|
@ -573,6 +573,9 @@ void ServantProxy::invoke(ReqMessage * msg, bool bCoroAsync)
|
||||
TLOGTARS("[TARS][ServantProxy::invoke, set dyeing, key=" << pSptd->_dyeingKey << endl);
|
||||
}
|
||||
|
||||
msg->hasCookie = pSptd->_hasCookie;
|
||||
msg->cookie = pSptd->_cookie;
|
||||
|
||||
|
||||
#ifdef _USE_OPENTRACKING
|
||||
msg->trackInfoMap = pSptd->_trackInfoMap;
|
||||
|
@ -203,6 +203,7 @@ struct ReqMessage : public TC_HandleBase
|
||||
, bCoroFlag(false)
|
||||
, sched(NULL)
|
||||
, iCoroId(0)
|
||||
, hasCookie(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -250,6 +251,7 @@ struct ReqMessage : public TC_HandleBase
|
||||
bCoroFlag = false;
|
||||
sched = NULL;
|
||||
iCoroId = 0;
|
||||
hasCookie = false;
|
||||
}
|
||||
|
||||
|
||||
@ -292,6 +294,9 @@ struct ReqMessage : public TC_HandleBase
|
||||
#ifdef _USE_OPENTRACKING
|
||||
std::unordered_map<std::string, std::string> trackInfoMap; //调用链信息
|
||||
#endif
|
||||
|
||||
bool hasCookie; // 是否包含cookie
|
||||
map<string, string> cookie; // cookie内容
|
||||
};
|
||||
|
||||
typedef TC_AutoPtr<ReqMessage> ReqMessagePtr;
|
||||
|
Loading…
Reference in New Issue
Block a user