Skip to content

Commit ccb196b

Browse files
Remove unnecessary url processing
1 parent e5b1503 commit ccb196b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public class SseClientTransport(
7676

7777
"endpoint" -> {
7878
try {
79-
val eventData = event.data?.removePrefix("/") ?: ""
79+
val eventData = event.data ?: ""
8080

8181
// check url correctness
82-
val maybeEndpoint = Url("$baseUrl/$eventData")
82+
val maybeEndpoint = Url(baseUrl + eventData)
8383

8484
endpoint.complete(maybeEndpoint.toString())
8585
} catch (e: Exception) {

0 commit comments

Comments
 (0)