postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Fix utf8 json #423

Closed TimBeyer closed 8 years ago

TimBeyer commented 8 years ago

When receiving large data, req.on('data', ...) sometimes cuts UTF-8 characters off in the middle of the buffer.
If you then cast the buffer to a string, you end up with broken characters in that string. Use StringDecoder instead to make sure characters are correctly assembled again.

Also fixes an issue with a wrongly named auto_delete key that kept tests from running.