Skip to content

Commit

Permalink
fix(router) correct assignments from ngx.re.sub
Browse files Browse the repository at this point in the history
The signature for ngx.re.sub is:

newstr, n, err = ngx.re.sub(subject, regex, replace, options?)
  • Loading branch information
p0pr0ck5 committed Apr 25, 2017
1 parent 4ac3156 commit cb82cfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kong/core/router.lua
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ function _M.new(apis)
new_uri = uri

else
local err
new_uri, err = re_sub(uri, api_t.strip_uri_regex, "/$1", "ajo")
local _, err
new_uri, _, err = re_sub(uri, api_t.strip_uri_regex, "/$1", "ajo")
if not new_uri then
log(ERR, "could not strip URI: ", err)
return
Expand Down

0 comments on commit cb82cfa

Please sign in to comment.