Skip to content

Commit d5b5a86

Browse files
authored
fix sse body \r\n parse
1 parent 1224f57 commit d5b5a86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mcp/src/main/java/io/modelcontextprotocol/client/transport/FlowSseClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected void data(final CharBuffer data, final boolean endOfStream) {
162162
}
163163

164164
private void onLine(String line) {
165-
if (line.isEmpty()) {
165+
if (line.trim().isEmpty()) {
166166
// Empty line means end of event
167167
if (eventBuilder.length() > 0) {
168168
String eventData = eventBuilder.toString();

0 commit comments

Comments
 (0)