Skip to content

Enhance radixtree_uri_with_parameter to automatically differentiate literal segments from path parameters #13439

@DewniSubasinghe

Description

@DewniSubasinghe

Description

The current radixtree_uri_with_parameter router cannot distinguish a literal segment from a parameterised one. (APISIX version: 3.14.1)
For example, with the following routes:

GET /user/comn-language/:tenantId/all
GET /user/comn-language/:tenantId/:langId

and the request /user/comn-language/123/all, the router cannot determine accurately which route to match unless a priority field is manually set it picks the GET /user/comn-language/:tenantId/:langId route
The router should be enhanced with a built‑in precedence rule: a literal segment always wins over a parameter placeholder when both could match the same request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions