An empty URI matches a single-variable resource template

オープン 初心者向け
#1,085 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@liyifan9642-creator がすでに取り組んでいます。

2026年10月13日 から。

  • #1117 @liyifan9642-creator による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
kotlin
領域
api

調査の方向性

PathSegmentTemplateMatcher.match と、should capture empty string for single-segment variable when URI is empty という名前の PathSegmentTemplateTest のテストケースから始めます。まずそのテストを実行し、その後、空の URI と空の変数セグメントが拒否され、テストが期待される結果を検証するようにマッチング動作を更新します。

索引モデルが issue の本文から書いたものです。

説明

bug P3

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.

主要言語
Kotlin
スター
1.5k
フォーク
270
平均マージ
3日 7時間
マージ済み PR(30日)
59

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/kotlin-sdk のほかの issue

modelcontextprotocol/kotlin-sdk の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。