Streamable HTTP POST can stay open after request timeout or cancellation

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

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

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
networking

調査の方向性

Start at mcp-core/src/main/java/io/modelcontextprotocol/client/transport/HttpClientStreamableHttpTransport.java around lines 545-591, where the request-scoped POST subscription is created. Reproduce with a local MCP test server that answers POST with text/event-stream and withholds the JSON-RPC response, then time out or dispose the caller and check whether the response body subscription is cancelled. Read related #1133 for pending response cleanup. Done means timeout or cancellation releases the POST and body while the client remains usable for other requests.

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

説明

Bug description

In MCP Java SDK 2.2.0, a request-scoped POST from the legacy HttpClientStreamableHttpTransport can remain active after its caller times out or cancels. The HTTP exchange has its own subscription, and cancellation of the caller does not reach it. Transport source in v2.2.0

Steps to reproduce

Have a local MCP test server answer a POST with text/event-stream and keep the stream open without sending the matching JSON-RPC response. Let the client request time out or dispose the request subscription while the stream is open. Observe whether the POST response body is cancelled.

Expected behavior

Timeout or cancellation releases the pending POST and its response body while leaving the client available for other requests.

Related: #1133 tracks cleanup of pending response entries.

主要言語
Java
スター
3.8k
フォーク
1.1k
平均マージ
1日 3時間
マージ済み PR(30日)
38

環境構築

はじめの一歩

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

modelcontextprotocol/java-sdk のほかの issue

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

似ている issue

Java の issue をもっと見る

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

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