diff --git a/plugins/golang-filter/mcp-session/common/sse.go b/plugins/golang-filter/mcp-session/common/sse.go index 11fee2458..b22e8f45b 100644 --- a/plugins/golang-filter/mcp-session/common/sse.go +++ b/plugins/golang-filter/mcp-session/common/sse.go @@ -136,7 +136,7 @@ func (s *SSEServer) HandleSSE(cb api.FilterCallbackHandler, stopChan chan struct } // Send the initial endpoint event - initialEvent := fmt.Sprintf("event: endpoint\ndata: %s\r\n\r\n", messageEndpoint) + initialEvent := fmt.Sprintf("event: endpoint\ndata: %s\n\n", messageEndpoint) err = s.redisClient.Publish(channel, initialEvent) if err != nil { api.LogErrorf("Failed to send initial event: %v", err) @@ -210,7 +210,7 @@ func (s *SSEServer) HandleMessage(w http.ResponseWriter, r *http.Request, body j var status int // Only send response if there is one (not for notifications) if response != nil { - if sessionID != ""{ + if sessionID != "" { w.WriteHeader(http.StatusAccepted) status = http.StatusAccepted } else {