Skip to content

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

Open
@Gary-Airwallex

Description

@Gary-Airwallex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions