tzssangglass commented on issue #1574: URL: https://github.com/apache/apisix/issues/1574#issuecomment-712312448
In `radixtree`# `_match_from_routes` function, may be judgement if it's a prefix matching before calling the `compare_param` function, and if so, simply return. like this ``` if match_route_opts(route, opts, ...) then -- log_info("matched route: ", require("cjson").encode(route)) -- log_info("matched path: ", path) --judgement if it's a prefix matching local last_char = string.sub(route.path_org, #route.path_org) ngx.log(ngx.WARN, "last_char: ", last_char) if last_char and last_char == '*' then if opts_matched_exists then opts.matched._path = route.path_org end return route end if compare_param(path, route, opts) then if opts_matched_exists then opts.matched._path = route.path_org end return route end end ::continue:: ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org