Matching line separators when decoding JSON aknowledgement data #603

wants to merge 1 commit into


None yet

0 participants

ghost commented Jan 9, 2014

Socket.IO client is not parsing aknowledgement JSON data correctly, because is not matching new line and line separator characters. When using these characters in a JSON packet the acknowledgement function is called with no arguments.

Testing code:

var io = require('').listen(8888);

io.sockets.on('connection', function (socket) {
  socket.on('ack', function(fn){
      fn({ "a": "\u2028" });

var io = require('');
var socket = io.connect("http://localhost:8888");
socket.on('connect', function(){
    socket.emit('ack', function(data){
        console.log(data); // Here data is lost
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment