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
8
8
import io.ktor.server.request.contentType
9
9
import io.ktor.server.request.host
10
10
import io.ktor.server.request.httpMethod
11
- import io.ktor.server.request.receive
12
11
import io.ktor.server.request.receiveText
13
12
import io.ktor.server.response.header
14
13
import io.ktor.server.response.respond
@@ -30,7 +29,6 @@ import kotlinx.coroutines.job
30
29
import kotlinx.coroutines.sync.Mutex
31
30
import kotlinx.coroutines.sync.withLock
32
31
import kotlinx.serialization.json.JsonArray
33
- import kotlinx.serialization.json.JsonElement
34
32
import kotlinx.serialization.json.JsonObject
35
33
import kotlinx.serialization.json.decodeFromJsonElement
36
34
import kotlin.concurrent.atomics.AtomicBoolean
@@ -237,7 +235,7 @@ public class StreamableHttpServerTransport(
237
235
return
238
236
}
239
237
240
- if (call.request.contentType() != ContentType .Application .Json ) {
238
+ if (! call.request.contentType().match( ContentType .Application .Json ) ) {
241
239
call.reject(
242
240
HttpStatusCode .UnsupportedMediaType , ErrorCode .Unknown (- 32000 ),
243
241
" Unsupported Media Type: Content-Type must be application/json"
You can’t perform that action at this time.
0 commit comments