jmesnil / stomp-websocket

Stomp client for Web browsers and node.js apps
http://jmesnil.net/stomp-websocket/doc/
Apache License 2.0
1.43k stars 586 forks source link

Incorrect content-length with multi-byte utf-8 characters #44

Closed JMontupet closed 10 years ago

JMontupet commented 10 years ago

I'm using stomp.js to send messages which contain some UTF-8 multibyte characters in their body. But the function 'Frame.prototype.toString' is only valid for single byte encoding characters ( because it use '.length' attribut ) and the header value 'content-length' becomes wrong.

thomasguillory commented 10 years ago

+1 I'm experiencing the same

@klemetsson has written a quick patch here

jmesnil commented 10 years ago

I pushed a commit that fixes this bug. thanks

yanchhuong commented 7 years ago

where is stomp.js to 2.3.1 ? i have same issue , link file please!!!

Polve commented 7 years ago

Check if the new library has the problem https://github.com/JSteunou/webstomp-client