ocharles / engine.io

A Haskell server implementation of the Engine.IO and Socket.IO (1.0) protocols
149 stars 28 forks source link

Problem with text packet encoding when websocket transport is used. #17

Closed katyo closed 9 years ago

katyo commented 9 years ago

I tried to send message with non-ascii characters in example chat application and I received some incomprehensible abracadabra in other client. It occurs with chat-yesod and chat-snap too. I'm not sure, that it's a server-side bug or not.

katyo commented 9 years ago

Correct encoding: websocket -> xhr-polling xhr-polling -> xhr-polling

Incorrect encoding: websocket -> websocket xhr-polling -> websocket

It looks like a websocket receiving problem (server->client).

ocharles commented 9 years ago

What version of the engine.io-client are you using?

ocharles commented 9 years ago

I ask because I wonder if you're hitting https://github.com/Automattic/engine.io-client/issues/322 - that's been released upstream, but my engine-io library hasn't been updated for this yet.

katyo commented 9 years ago

This is a chat example from examples directory. https://cdn.socket.io/socket.io-1.0.6.js

ocharles commented 9 years ago

This should now be fixed with engine-io-1.2.3 - could you try that? I used socket.io-1.2.1.js.