mirror of
https://github.com/faye/websocket-driver-ruby.git
synced 2025-11-01 13:59:38 +00:00
Separate all EventSource lines with CR-LF.
This commit is contained in:
@@ -49,8 +49,8 @@ module Faye
|
||||
|
||||
def send(message, options = {})
|
||||
frame = ""
|
||||
frame << "event: #{options[:event]}\n" if options[:event]
|
||||
frame << "id: #{options[:id]}\n" if options[:id]
|
||||
frame << "event: #{options[:event]}\r\n" if options[:event]
|
||||
frame << "id: #{options[:id]}\r\n" if options[:id]
|
||||
frame << "data: #{WebSocket.encode(message)}\r\n\r\n"
|
||||
@stream.write(frame)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user