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

Fixed 'Invalid non-string/buffer chunk' error when using Uint8Array #266

Closed
wants to merge 3 commits into from

Conversation

e-avidan
Copy link

Using 'new Buffer' on a Uint8Array does not create a Buffer object, but adding a Uint8Array chunk is supported by the library, so I added a check to the validation to allow this

@mcollina
Copy link
Member

We pull our changes from Node.js core, so we cannot accept this one here.
You should send a PR to https://github.com/nodejs/node.

How does this relates to nodejs/node#11608?

cc @addaleax

@mcollina mcollina closed this Mar 17, 2017
@addaleax
Copy link
Member

How does this relates to nodejs/node#11608?

They try to achieve the same thing (I think), but this approach would just let Uint8Arrays pass through to the _read() method instead of adjusting its prototype. I don’t think that’s a good idea.

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.

3 participants