Skip to content

Commit 1c7bc99

Browse files
committed
Add /r/r support
1 parent 7b2f4f5 commit 1c7bc99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/EventSource/EventParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct ServerEventParser: EventParser {
3939
}
4040

4141
private func splitBuffer(for data: Data) -> (completeData: [Data], remainingData: Data) {
42-
let separators: [[UInt8]] = [[Self.lf, Self.lf], [Self.cr, Self.lf, Self.cr, Self.lf]]
42+
let separators: [[UInt8]] = [[Self.cr, Self.cr], [Self.lf, Self.lf], [Self.cr, Self.lf, Self.cr, Self.lf]]
4343

4444
// find last range of our separator, most likely to be fast enough
4545
let (chosenSeparator, lastSeparatorRange) = findLastSeparator(in: data, separators: separators)

0 commit comments

Comments
 (0)