File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public class SseClientTransport(
3939 private var job: Job ? = null
4040
4141 private val baseUrl by lazy {
42- session.call.request.url.toString().removeSuffix(" /" )
42+ session.call.request.url.toString().removeSuffix(" /sse " )
4343 }
4444
4545 override suspend fun start () {
@@ -52,7 +52,7 @@ public class SseClientTransport(
5252
5353 session = urlString?.let {
5454 client.sseSession(
55- urlString = it ,
55+ urlString = " $it /sse " ,
5656 reconnectionTime = reconnectionTime,
5757 block = requestBuilder,
5858 )
@@ -76,7 +76,7 @@ public class SseClientTransport(
7676
7777 " endpoint" -> {
7878 try {
79- val eventData = event.data ? : " "
79+ val eventData = event.data?.removePrefix( " / " ) ? : " "
8080
8181 // check url correctness
8282 val maybeEndpoint = Url (" $baseUrl /$eventData " )
You can’t perform that action at this time.
0 commit comments