Commit Graph

20 Commits

Author SHA1 Message Date
Damien Arrachequesne
292c00c183 [fix] Encode string payloads as strings even if binary supported (#85)
This reverts commit 44c7aa5, which caused string payloads to be encoded
as binary (so that huge string payloads were needlessly UTF-8-encoded).

Related: https://github.com/socketio/socket.io/issues/2872
2017-03-06 12:24:11 +01:00
Damien Arrachequesne
d1c2680ca9 [fix] Sanitize strings by removing lone surrogates (#82) 2016-12-21 22:01:19 +01:00
Damien Arrachequesne
181acef657 [fix] Fix double utf8 encoding for payloads (#81) 2016-12-21 09:15:07 +01:00
Damien Arrachequesne
6741900f37 [fix] Handle undefined case properly when decoding packet (#74) 2016-10-20 14:39:04 +02:00
jm
5aecaa914d [fix] decodePacket now accepts both Buffer and ArrayBuffer as data
Closes #64, fixes #60
2016-10-20 14:17:02 +02:00
Damien Arrachequesne
96fa4f907a Fix ArrayBuffer encoding in base64 string 2015-12-02 10:49:33 +01:00
nkzawa
685cb719e8 fix encoding blob as base64 2015-11-22 16:05:26 +09:00
Tony Kovanen
44c7aa5ab9 Fix parse error
We always need to send binary when encoding payloads when sending from
server to client, because the polling transport has to know the response
type ahead of time.
2015-01-16 21:19:27 +02:00
Guillermo Rauch
e53e9f5931 Merge pull request #36 from cvlchinet/patch
Allow sending binary data without ArrayBuffer (e. g. IE8)
2014-12-10 17:57:26 -03:00
Tony Kovanen
68d89ab7a9 encode into binary only if needed 2014-12-03 02:07:10 +02:00
Chi Vinh Le
1e337d3f65 Add test cases for base64 object encoding. 2014-11-20 23:38:49 +01:00
Tony Kovanen
b10666cf94 Test that utf8 encoding is not on by default but can be switched on manually. 2014-07-17 01:21:41 +03:00
Tony Kovanen
95840ca6b6 Don't UTF-8 encode packets unless asked.
Still done in payload encoding for polling, but no need with WebSockets since it deals with UTF-8 itself.
2014-07-17 00:54:00 +03:00
Naoyuki Kanezawa
4dc1a13750 handle invalid utf8 errors gracefully 2014-06-29 18:22:53 +09:00
Tony Kovanen
4ff516b94a Adjust test to use proper data types and to only run for supporting browsers when testing the memory leak fix 2014-06-25 10:17:56 +03:00
Christoph Witzko
d41f8e06da fix decodePayloadAsBinary memory leak 2014-06-24 23:49:57 +02:00
Tony Kovanen
37ede5ffdd Add parser encode/decode test with long dash 2014-05-30 16:20:36 +03:00
Tony Kovanen
134897a1e0 Cleaned up logic for deciding if blob tests should be run 2014-03-09 01:01:17 +02:00
Tony Kovanen
8e5557d712 Added zuul configurations and testing for browsers 2014-02-19 21:26:27 +02:00
Guillermo Rauch
105fb8befe moving code from engine.io-protocol 2014-02-18 13:06:06 -08:00