This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git
The following commit(s) were added to refs/heads/master by this push: new 19663a8 bug: fixed wrong string join in limit-count plugin. (#1487) 19663a8 is described below commit 19663a87a09d5bde38fe4e06abc25ec9d8c05602 Author: Wen Ming <moonbingb...@gmail.com> AuthorDate: Wed Apr 22 13:27:00 2020 +0800 bug: fixed wrong string join in limit-count plugin. (#1487) --- apisix/plugins/limit-count.lua | 2 +- t/plugin/limit-count-redis.t | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apisix/plugins/limit-count.lua b/apisix/plugins/limit-count.lua index c95e3f6..42db2d5 100644 --- a/apisix/plugins/limit-count.lua +++ b/apisix/plugins/limit-count.lua @@ -125,7 +125,7 @@ function _M.access(conf, ctx) end core.log.error("failed to limit req: ", err) - return 500, {error_msg = "failed to limit count: ", err} + return 500, {error_msg = "failed to limit count: " .. err} end core.response.set_header("X-RateLimit-Limit", conf.count, diff --git a/t/plugin/limit-count-redis.t b/t/plugin/limit-count-redis.t index 559d8a8..6959af9 100644 --- a/t/plugin/limit-count-redis.t +++ b/t/plugin/limit-count-redis.t @@ -247,7 +247,7 @@ passed local val = redis.pcall('CONFIG', 'SET', key, value) return val ]], 0) - -- + -- if not res then ngx.say("failed to set: ", err) return @@ -370,7 +370,7 @@ GET /hello_new --- error_code eval 500 --- response_body -{"1":"ERR invalid password","error_msg":"failed to limit count: "} +{"error_msg":"failed to limit count: ERR invalid password"} --- error_log failed to limit req: ERR invalid password @@ -426,7 +426,7 @@ failed to limit req: ERR invalid password local val = redis.pcall('CONFIG', 'SET', key, value) return val ]], 0) - -- + -- if not res then ngx.say("failed to set: ", err) return