Browse Source

Z991239-1017 #comment fea 解决info中数据解析异常问题

陈良瑜80374463 4 years ago
parent
commit
ba378fb199
1 changed files with 21 additions and 1 deletions
  1. 21 1
      Module/mod_chromium/CWSCodec.cpp

+ 21 - 1
Module/mod_chromium/CWSCodec.cpp

@@ -701,7 +701,27 @@ namespace Chromium {
 			return;
 			return;
 		}
 		}
 
 
-		GeneralSerialize(js, data, wpos, capacity, pI, errmsg);
+		auto paramJs = cJSON_GetObjectItem(js, PARAMLIST_HEAD);
+		if (paramJs == NULL)
+		{
+			//detect the same name 
+			std::string t_arr[] = { "transID", "sessionID", "methodID", "signature", "timeout" ,"messageType","class","entity","methodID" };
+			std::vector<std::string> c_repeatParamList(t_arr, t_arr + sizeof(t_arr) / sizeof(t_arr[0]));
+			for (auto paramInfo : pI->mRequestInterpreter.mParamList)
+			{
+				for (auto repeatName : c_repeatParamList)
+				{
+					if (paramInfo.mName == repeatName)
+						DbgEx("request参数名字重复, error, %s", paramInfo.mName.c_str());
+				}
+			}
+			//如果存在重复,可能数据已经脏了,所以也不需要作删除参数处理
+
+			paramJs = js;
+		}
+
+
+		GeneralSerialize(paramJs, data, wpos, capacity, pI, errmsg);
 
 
 		return;
 		return;
 	}
 	}