aacerox/node-rest-client — pull request #46 by tobias-khs (2014-08-05 03:58:52+00:00)
Title: Fix concatenation of chunks

Instead of using array.join, use Buffer.concat.

I came across of some corrupted characters when retrieving JSON data that contained Japanese text elements (utf8).

When making a request to a text resource the retrieved chunks from the http lib may split unicode characters. When joining (array.join) them some of these chunks start or end in corrupted characters. Using Buffer.concat(..) and then making the string conversion, potentially split characters are first put together correctly.