From cd8e5d5f7f5ea66f97f99610696802d0e32f5b4c Mon Sep 17 00:00:00 2001 From: Luca <37640802+lucapivato@users.noreply.github.com> Date: Wed, 2 Jul 2025 22:13:13 +0200 Subject: [PATCH] Fixed StreamableHttpClientSessionTransport.cs for netstandard (#582) Fixed exception 'The format of value 'application/json; charset=utf-8' is invalid --- .../Client/StreamableHttpClientSessionTransport.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ModelContextProtocol.Core/Client/StreamableHttpClientSessionTransport.cs b/src/ModelContextProtocol.Core/Client/StreamableHttpClientSessionTransport.cs index 14df5c3..7821786 100644 --- a/src/ModelContextProtocol.Core/Client/StreamableHttpClientSessionTransport.cs +++ b/src/ModelContextProtocol.Core/Client/StreamableHttpClientSessionTransport.cs @@ -75,7 +75,7 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa using var content = new StringContent( JsonSerializer.Serialize(message, McpJsonUtilities.JsonContext.Default.JsonRpcMessage), Encoding.UTF8, - "application/json; charset=utf-8" + "application/json" ); #endif @@ -310,4 +310,4 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa } } } -} \ No newline at end of file +}