lua-resty-radixtree icon indicating copy to clipboard operation
lua-resty-radixtree copied to clipboard

bug: parameter in path matching fails on percent encoding in the URI

Open Gary-Airwallex opened this issue 7 months ago • 2 comments

When APISIX calls dispatch it sends Nginx normalized URI which decodes percent encoded characters, i.e. /uri%20contains%20space would become /uri contains space. The matching behavior of radixtree should be aware of this decoding. Steps to reproduce

  1. Create a new matching rule with a parameter in path
{
    paths = { "/test/:id/update" },
    methods = { "GET" },
}
  1. Match the rule with an URI that contains space, e.g. /test/contains space/update
  2. The URI is expected to match the parameter :id but it does not.

Gary-Airwallex avatar Jul 24 '24 03:07 Gary-Airwallex