Skip to content

[Server] Fix StreamableHttpTransport mutable state and clock - #45

Closed
chr-hertel wants to merge 2 commits into
mainfrom
fix/issue-22-transport-state
Closed

chr-hertel wants to merge 2 commits into
mainfrom
fix/issue-22-transport-state

Conversation

@chr-hertel

Copy link
Copy Markdown
Owner

Closes #22

  • Immediate response state is consumed once in handlePostRequest(), so a reused transport instance no longer replays the first POST's response (regression test: two sequential POSTs through one instance).
  • $this->request is no longer reassigned mid-flight; the middleware-processed request is threaded as a parameter and the property is now readonly.
  • ClockInterface is injected (default NativeClock, matching the session stores) and used for pending-request timeouts, making the polling loop's timeout testable without a 120s sleep.

The echo/flush SSE body in CallbackStream is intentionally left as-is — it is inherent to the CallbackStream design and rewriting it is out of scope here.

Confidence: 9/10 — all changes are behavior-preserving state fixes covered by targeted regression tests that fail on the old code; full unit suite, php-cs-fixer, and phpstan are green.

dependabot Bot and others added 2 commits August 26, 2026 07:45
…xtprotocol#483)

Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 9.0.0 to 10.0.1.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@v9.0.0...v10.0.1)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@chr-hertel
chr-hertel force-pushed the fix/issue-22-transport-state branch from 3ccda3f to 7450d39 Compare August 29, 2026 08:30
@chr-hertel

Copy link
Copy Markdown
Owner Author

Closed upstream by modelcontextprotocol#487

@chr-hertel chr-hertel closed this Sep 4, 2026
@chr-hertel
chr-hertel deleted the fix/issue-22-transport-state branch September 4, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[B8] A PSR-7 transport writing to global output

1 participant