Skip to content
New issue

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

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

Already on GitHub? Sign in 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
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.

client.request throws Error with setEncoding
3 participants