GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — doc, http: add Uint8Array as allowed type by Flarna · Pull Request #45167 · nodejs/node ConversationOutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
ShogunPanda
approved these changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
mcollina
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lgtm
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Do you know the versions? Seems this was done long time ago and not directly in HTTP instead somewhere else. I just know that the version differs between Update: it doesn't work on 14.x because #33155 was backported but #31818 was not therefore |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --> | ||
|
|
||
| * `data` {string|Buffer} | ||
| * `data` {string|Buffer|Uint8Array} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to remember, are other TypedArray types supported also? e.g. Uint16Array, Uint32Array, etc. If so, this should likely be updated to be TypedArray rather than just Uint8Array
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
According to docs e.g. fs supports this but not http, see
Lines 836 to 845 in 775bf62
| if (chunk === null) { | |
| throw new ERR_STREAM_NULL_VALUES(); | |
| } else if (typeof chunk === 'string') { | |
| len = Buffer.byteLength(chunk, encoding); | |
| } else if (isUint8Array(chunk)) { | |
| len = chunk.length; | |
| } else { | |
| throw new ERR_INVALID_ARG_TYPE( | |
| 'chunk', ['string', 'Buffer', 'Uint8Array'], chunk); | |
| } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 760695b |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.