Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: setEncoding should not throw on body #1125 #3505

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 25, 2024

Fixes #1125

Super old bug #1125 is the result of some premature encoding of already buffered content in node core.

https://github.com/nodejs/node/blob/4e68b541fd7ccd9fe1328d5b4dc93a3689aa505d/lib/internal/streams/readable.js#L585

This PR overwrites the setEncoding function, with a custom solution which is not encoding the buffered content.

@Uzlopak Uzlopak requested review from ronag and mcollina August 25, 2024 02:12
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Uzlopak Uzlopak merged commit 9d57401 into nodejs:main Aug 25, 2024
32 checks passed
@Uzlopak Uzlopak deleted the fix-1125 branch August 25, 2024 11:03
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
This was referenced Dec 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

client.request throws Error with setEncoding
3 participants