Commit Graph

71 Commits

Author SHA1 Message Date
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
2c1beccbb1 Add line space. 2014-11-20 23:49:46 +01:00
Chi Vinh Le
7112b97908 Add encodeBase64Object to encoder for browser 2014-11-20 13:49:46 +01:00
ddivernois
d2e1e94ef5 Avoid sending Blobs on PhantomJS (as on Android)
Uploading a Blob with PhantomJS does not work correctly, as reported here:
https://github.com/ariya/phantomjs/issues/11395
2014-10-06 11:13:11 +02: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
Guillermo Rauch
1e26a69e4f adjust protocol revision. fixes #30 2014-07-12 21:01:22 -07:00
Naoyuki Kanezawa
4dc1a13750 handle invalid utf8 errors gracefully 2014-06-29 18:22:53 +09:00
Tony Kovanen
0cec2433b2 Fix memory leak on browser
Will exit with an error packet if the packet length string doesn't contain the value 255 in binary packets.
2014-06-25 06:32:05 +03:00
Guillermo Rauch
ca02f2bfad add comment per @christophwitzko 2014-06-24 15:20:18 -07:00
Christoph Witzko
d41f8e06da fix decodePayloadAsBinary memory leak 2014-06-24 23:49:57 +02:00
Tony Kovanen
2da2fbbabc Don't use the already deprecated binary buffer encoding 2014-05-30 16:04:38 +03:00
Tony Kovanen
067e286d2b Use plain binary encoding for byte length since we're now using utf8.js 2014-05-30 14:15:27 +03:00
Joey Baker
b0e75f94c4 Don't pass too many arguments
`.apply()` has a max argument length which was easily exceeded by a large buffer. This makes more calls to `String.fromCharCode` but is guaranteed not to throw a `RangeError`.

More on max argument size: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply#Using_apply_and_built-in_functions
2014-05-05 15:02:08 -07:00
Tony Kovanen
52bc2f8c03 Encode strings with utf8.js to support multibyte strings 2014-04-30 01:23:35 +03:00
Naoyuki Kanezawa
14728f9a77 fix encodePayloadAsBinary method encodes packets to base64 2014-04-02 00:41:40 +09:00
binlain
395ff6f86f Fix length calculation when encoding as binary 2014-03-26 00:11:02 +01:00
Tony Kovanen
112c37966b Encoding binary as ArrayBuffer for android, because blob data is sent as empty payload 2014-03-16 14:28:04 +02:00
Tony Kovanen
ec08d1d004 Using the blob module for creating a blob constructor that abstracts the constructor api used 2014-03-07 00:35:46 +02:00
Tony Kovanen
56e1ce292d Style, bump arraybuffer.slice version and remove nbsp 2014-03-06 22:49:24 +02:00
Guillermo Rauch
105fb8befe moving code from engine.io-protocol 2014-02-18 13:06:06 -08:00