Unverified Commit f3841c67 authored by Anna Henningsen's avatar Anna Henningsen Committed by Beth Griggs
Browse files

stream: convert existing buffer when calling .setEncoding

Convert already-stored chunks when `.setEncoding()` is called
so that subsequent `data` events will receive decoded strings,
as they expect.

Fixes: https://github.com/nodejs/node/issues/27932

PR-URL: https://github.com/nodejs/node/pull/27936


Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
parent f34bb968
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment