Skip to content

An empty URI matches a single-variable resource template #1085

Description

@devcrocod

PathSegmentTemplateMatcher.match("") splits "" into one empty segment, so the template {id} matches with id = "". A resources/read request with uri: "" then reaches that template's handler with an empty variable. The behavior is pinned by the PathSegmentTemplateMatcherTest case should capture empty string for single-segment variable when URI is empty.

Related: #1084.

Activity

  1. added this to the 0.21.0 milestone on Sep 30, 2026
  2. added
    bug
    P3
    on Sep 30, 2026
  3. added theissue type on Sep 30, 2026
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

    P3bug

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions