From 103eb27ac3dfef123e6b5e9e3dffe38b1faa075d Mon Sep 17 00:00:00 2001 From: 486 Date: Mon, 29 Sep 2014 12:48:09 +0200 Subject: [PATCH] accept all newline variations "The sequence CRLF (0x0d0a) is used to end a record, although parsers SHOULD be tolerant and also accept records terminated with a single newline character." --- lib/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parser.js b/lib/parser.js index c5a0dd6..1d0a419 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -43,7 +43,7 @@ exports.parse = function (sdp) { , location = session; // points at where properties go under (one of the above) // parse lines we understand - sdp.split('\r\n').filter(validLine).forEach(function (l) { + sdp.split(/(\r\n|\r|\n)/).filter(validLine).forEach(function (l) { var type = l[0]; var content = l.slice(2); if (type === 'm') {