Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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