Skip to content

Conversation

@hpawe01
Copy link

@hpawe01 hpawe01 commented Nov 21, 2024

Commit 1611ba6 added support for unzipped responses but forgot to concatenate the buffers before converting them to a string. This results in a corrupt JSON string if we have more than one element in the response buffers (e.g. for a large response). If we have multiple elements in the response buffers responseBuffers.toString() would include ',' as default concatenation character. We could also use responseBuffers.join('') to get the same result, but with Buffer.concat(responseBuffers) we can use the same object also as parameter for the gunzip method in case the response is gzipped.

commit 1611ba6 added support for unzipped responses but forgot to concatenate the buffers before converting them to a string.
@hpawe01
Copy link
Author

hpawe01 commented Nov 22, 2024

Fixes #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant