Skip to content

Commit

Permalink
Fixed \n parsing for non-JSON packets (fixes socketio#479).
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Sep 3, 2011
1 parent e282ab0 commit a9bbc38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ exports.encodePayload = function (packets) {
* @api private
*/

var regexp = /^([^:]+):([0-9]+)?(\+)?:([^:]+)?:?(.*)?$/;
var regexp = /([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;

exports.decodePacket = function (data) {
var pieces = data.match(regexp);
Expand Down

0 comments on commit a9bbc38

Please sign in to comment.