File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import io.ktor.server.application.ApplicationCall
88import io.ktor.server.request.contentType
99import io.ktor.server.request.host
1010import io.ktor.server.request.httpMethod
11- import io.ktor.server.request.receive
1211import io.ktor.server.request.receiveText
1312import io.ktor.server.response.header
1413import io.ktor.server.response.respond
@@ -30,7 +29,6 @@ import kotlinx.coroutines.job
3029import kotlinx.coroutines.sync.Mutex
3130import kotlinx.coroutines.sync.withLock
3231import kotlinx.serialization.json.JsonArray
33- import kotlinx.serialization.json.JsonElement
3432import kotlinx.serialization.json.JsonObject
3533import kotlinx.serialization.json.decodeFromJsonElement
3634import kotlin.concurrent.atomics.AtomicBoolean
@@ -237,7 +235,7 @@ public class StreamableHttpServerTransport(
237235 return
238236 }
239237
240- if (call.request.contentType() != ContentType .Application .Json ) {
238+ if (! call.request.contentType().match( ContentType .Application .Json ) ) {
241239 call.reject(
242240 HttpStatusCode .UnsupportedMediaType , ErrorCode .Unknown (- 32000 ),
243241 " Unsupported Media Type: Content-Type must be application/json"
You can’t perform that action at this time.
0 commit comments