Skip to content

Commit 52300c3

Browse files
nerzhulartkpavlov
authored andcommitted
Properly check content type. Should fix #450
1 parent 0d3494b commit 52300c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class SseServerTransport(private val endpoint: String, private val sessio
8080

8181
val body = try {
8282
val ct = call.request.contentType()
83-
if (ct != ContentType.Application.Json) {
83+
if (!ct.match(ContentType.Application.Json)) {
8484
error("Unsupported content-type: $ct")
8585
}
8686

0 commit comments

Comments
 (0)