Weird characters on websocket.send()
See original GitHub issueWhen sending anything with a Websocket.Server instance, I always get the answer like this
�{"success":true}��
This was the String { “success”: true }
No matter what I send with ws.send
(where websocket is the server instance), I always get these weird characters. Even with an empty call
���
This was a completely empty send() call
Any idea on how to get rid of this? Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
How can I fix the weird characters I receive from my websocket
I have tried adding a Base64 encoder and decoder but that didn't work. Also I removed all ws.send() functions and I noticed that...
Read more >Special characters wrong encoding · Issue #498 - GitHub
I have a problem with the encoding of special characters. If I send e.g. ß from the client to the server and print...
Read more >[RESOLVED] [2005] Sending special characters (å ä ö) using ...
Hey guys. I need to be able to send special characters such as é, å, ö using sockets. Lets say im making a...
Read more >Web Socket Vulnerabilites - Cobalt.io
Sec-WebSocket-Accept header: The server concatenates the value obtained via the 'Sec-WebSocket-Key' client and the character string '258EAFA5- ...
Read more >WebSocket.send() - Web APIs - MDN Web Docs - Mozilla
The WebSocket.send() method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well then allow me to speculate… Looks like the server is framing whatever you are sending…
Suggestion… run the client with developer tools to look at the frame character codes; see if they are the same whatever the source string…
Maybe that can provide a hint to whom wrote the server code…
Hope this helps
Well, here you are assuming that WebSocket works fine via
curl
command. It may, or not. Probably it doesn’t.Please, ensure that you are testing the WebSocket-Node library rather than Curl.