kotlin-sdk/kotlin-sdk-client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jakub Amanowicz 43b59c9fc1
fix: SseTransport endpoint resolution (#329) (#565)
## Summary
Fix SSE endpoint resolution so absolute paths resolve against the
origin, and add tests covering absolute vs relative endpoint events.

## Motivation and Context
The SSE transport currently resolves all endpoint events against the SSE
URL’s base path. When the server sends an absolute endpoint (starting
with `/`), the client incorrectly prefixes it with the SSE path. This
change resolves absolute endpoints against the origin while keeping
relative behavior unchanged.

addresses: https://github.com/modelcontextprotocol/kotlin-sdk/issues/329

## How Has This Been Tested?
Unit tests added in `SseClientTransportTest` for absolute and relative
endpoint events.

## Breaking Changes
No.

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update

## Checklist
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed

## Additional context
The endpoint resolution logic now treats paths starting with `/` as
origin-relative. Relative paths continue to resolve against the SSE base
URL.
2026-02-26 12:00:46 +01:00
..
api refactor: Introduce AbstractClientTransport and simplify client transport lifecycle (#517) (#516) 2026-02-13 13:08:26 +02:00
src fix: SseTransport endpoint resolution (#329) (#565) 2026-02-26 12:00:46 +01:00
build.gradle.kts feat: Add kotlin-sdk-testing module with channel-based transport implementation (#505) 2026-02-16 14:10:56 +02:00
detekt-baseline-commonMainSourceSet.xml refactor: Harden detekt setup, address some issues (#507) 2026-02-13 22:17:27 +02:00
detekt-baseline-commonTestSourceSet.xml refactor: Harden detekt setup, address some issues (#507) 2026-02-13 22:17:27 +02:00
detekt-baseline-main.xml refactor: Harden detekt setup, address some issues (#507) 2026-02-13 22:17:27 +02:00
detekt-baseline-test.xml refactor: Harden detekt setup, address some issues (#507) 2026-02-13 22:17:27 +02:00
Module.md docs: Update readme, enable Knit (#162) (#510) 2026-02-06 18:40:31 +02:00