| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer.
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
Perhaps we should add the first node version(s) in which they were supported as well? |
Sorry, something went wrong.
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 write and end - e.g. 14.20.1 write allows it but end throws. Update: it doesn't work on 14.x because #33155 was backported but #31818 was not therefore end has still a Buffer || string check there. |
Sorry, something went wrong.
| --> | ||
|
|
||
| * `data` {string|Buffer} | ||
| * `data` {string|Buffer|Uint8Array} |
There was a problem hiding this comment.
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 a problem hiding this comment.
According to docs e.g. fs supports this but not http, see
Lines 836 to 845 in 775bf62
Sorry, something went wrong.
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
| Back | FazBrowse Home | New Git URL |
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer.