Skip to content

Commit be82277

Browse files
authored
Fix non utf-8 sse pending (#45)
1 parent 61ebcbd commit be82277

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.4
2+
3+
- Fix issue with StreamableHTTP server not setting correct content-type for SSE
4+
15
## 0.6.3
26

37
- Replace print statements with lightweight logging implementation

lib/src/server/streamable_https.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class StreamableHTTPServerTransport implements Transport {
298298
eventData += "data: ${jsonEncode(message.toJson())}\n\n";
299299

300300
try {
301-
res.write(eventData);
301+
res.add(utf8.encode(eventData));
302302
res.flush();
303303
return true;
304304
} catch (e) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mcp_dart
22
description: Dart Implementation of Model Context Protocol (MCP) SDK.
3-
version: 0.6.3
3+
version: 0.6.4
44
repository: https://github.com/leehack/mcp_dart
55

66
environment:

0 commit comments

Comments
 (0)