|
@@ -66,6 +66,12 @@ local function l_get_math_controller_and_func(path)
|
66
|
66
|
return string.format("%s", controller), func
|
67
|
67
|
end
|
68
|
68
|
|
|
69
|
+-- 根据协议获取模块
|
|
70
|
+local function _get_cotroller(proto)
|
|
71
|
+ local data = string.split(proto, "_")
|
|
72
|
+ return data[1]
|
|
73
|
+end
|
|
74
|
+
|
69
|
75
|
-- 匹配静态资源
|
70
|
76
|
local function l_is_match_static(path)
|
71
|
77
|
if not IS_TEST then
|
|
@@ -229,7 +235,7 @@ end
|
229
|
235
|
local function SPROTO(name, args, response)
|
230
|
236
|
local res = {code = 200, body = nil, headers = l_get_req_headers()}
|
231
|
237
|
|
232
|
|
- local controllerName, method = l_get_math_controller_and_func(name)
|
|
238
|
+ local controllerName = _get_cotroller(name)
|
233
|
239
|
local controller = controllerList[controllerName]
|
234
|
240
|
if not controller then
|
235
|
241
|
log.error("SPROTO controller[%s] not exist", controllerName)
|