cramp-pub-sub-chat-demo
cramp-pub-sub-chat-demo copied to clipboard
the string received in server is wrong
In file chat_action.rb:17, the received param 'data' messed up. See error below:
Yajl::ParseError: lexical error: invalid char in json text.
??K\?0~t??5z?if7?$5{?g~`?..7?i
(right here) ------^
Looks like some encode/decode issue.
Same issue here with Chrome (16.0.912.63 beta, Sec-WebSocket-Version: 13) Works fine with FireFox (8.0, Sec-WebSocket-Version: 8) though.
127.0.0.1 - - [02/Jan/2012 14:24:55] "GET HTTP/1.1" 200 - 0.0040
Yajl::ParseError: lexical error: invalid char in json text.
��͞�ٶ�������老�������㪨���
(right here) ------^
/home/leucos/.rvm/gems/ruby-1.9.3-p0@webchat/gems/yajl-ruby-1.1.0/lib/yajl.rb:36:in `parse'
This happens here (gererated from index.erb, line 80):
// send name when joining
ws.onopen = function() {
ws.send($.toJSON({ action: 'join', user: name }));
}
Cramp::WebSocket probably doesn't support the latest drafts.
this issue is gone in master branch. probably after websocket implementation has been replaced with faye-websocket.
Nah, still there.
Getting following error in FF 16.0.1 and Chrome 22.0.1229.94 on Ubuntu at chat_action.rb:58:in `parse_json'
Yajl::ParseError: lexical error: invalid char in json text.
����m�t�b�z�4�7�y�{�:�`�s�7�4
(right here) ------^