This commit is contained in:
aozhiwei 2022-12-27 09:47:17 +08:00
parent d495414ba9
commit 5372273927
3 changed files with 8 additions and 8 deletions

View File

@ -149,7 +149,7 @@ void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
request->saddr = saddr;
request->socket_handle = sockhandle;
request->query_str = querystr;
request->request.ReadFromUrlQueryString(querystr);
request->params->ReadFromUrlQueryString(querystr);
request->resp_xobj->SetVal("errcode", 0);
request->resp_xobj->SetVal("errmsg", "");
itr->second(request);

View File

@ -27,24 +27,24 @@ static void _ProxyCallback(std::shared_ptr<f8::JsonHttpRequest> request)
#ifdef DEBUG
f8::UdpLog::Instance()->Debug("ProxyCallbBack request:%s",
{
request->request.ToJsonStr()
request->params->ToJsonStr()
});
#endif
std::string seq_id = request->request.Get("seq_id");
std::string seq_id = request->params->Get("seq_id");
std::shared_ptr<HttpProxyRequest> req = HttpProxy::Instance()->GetRequest(seq_id);
if (req) {
a8::XObject data;
data.ReadFromJsonString(request->request.Get("data").GetString());
data.ReadFromJsonString(request->params->Get("data").GetString());
if (data.GetType() == a8::XOT_SIMPLE) {
data.ReadFromJsonString("{}");
}
f8::HttpContext ctx;
if (request->request.HasKey("errcode") &&
request->request.Get("errcode").GetInt() == 0) {
if (request->params->HasKey("errcode") &&
request->params->Get("errcode").GetInt() == 0) {
req->cb(true, &data, &ctx);
} else {
req->cb(false, &request->request, &ctx);
req->cb(false, request->params.get(), &ctx);
}
HttpProxy::Instance()->DestoryRequest(req);
}

2
third_party/f8 vendored

@ -1 +1 @@
Subproject commit 4933bf3dde65a20dbcb11b296e7a3a1aa4ac6ef6
Subproject commit cea561b5ae61e6bd23d85c7dbc3bdb0311bdc0ee