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

http: outputSize and UInt8Array #46605

Closed
wants to merge 1 commit into from
Closed

Conversation

ronag
Copy link
Member

@ronag ronag commented Feb 10, 2023

data doesn't have a length propery if it's not a Buffer but is a typed array.

@ronag ronag added the http Issues or PRs related to the http subsystem. label Feb 10, 2023
@ronag ronag requested a review from mcollina February 10, 2023 10:03
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Feb 10, 2023
@@ -386,7 +386,7 @@ function _getMessageBodySize(chunk, headers, encoding) {
}

OutgoingMessage.prototype._writeRaw = _writeRaw;
function _writeRaw(data, encoding, callback) {
function _writeRaw(data, encoding, callback, size) {
Copy link
Member Author

Choose a reason for hiding this comment

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

size comes from #46601

data doesn't have a length propery if it's not a Buffer but is
a typed array.
@aduh95
Copy link
Contributor

aduh95 commented Feb 10, 2023

data doesn't have a length property if it's not a Buffer but is a typed array.

TypedArrays have a length getter though: https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.length

@ronag ronag closed this Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants