Uh oh!
There was an error while loading. Please reload this page.
http: don't throw on Uint8Arrays for http.ServerResponse#write - #33155
http: don't throw on Uint8Arrays for http.ServerResponse#write#33155rexagod wants to merge 2 commits into
Uint8Arrays for http.ServerResponse#write#33155Conversation
4cf2098 to
7ce222fCompare
ronag
left a comment
There was a problem hiding this comment.
I would prefer if you tried to make it as similar as possible to what's in Writable.
Also, please try to avoid unrelated whitespace changes.
Http2Server.Response.writeHttp2Server.Response.writeaddaleax
commented
May 2, 2020
Yeah, I think this should also change the HTTP/1 code and leave HTTP/2 alone because that’s already doing the right thing, like #33146 👍 |
rexagod
commented
May 2, 2020
@addaleax Sorry but I'm confused as to what you are referring to the 'right thing'. If I'm understanding this right, do you want me to remove these type checks for write (in http2), and what should I change in http/1 (since it already has type checks)? |
addaleax
commented
May 2, 2020
@rexagod Fit the HTTP/1 code so that it also accepts any type of Uint8Array (i.e. replace |
56a56f0 to
b253d17Comparerexagod
commented
May 3, 2020
Thank you so much for clearing this up for me, @addaleax! Sometimes I miss to see the obvious and it's really frustrating! 😅 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
BridgeAR
commented
May 3, 2020
@ronag PTAL. I think your comment got resolved. |
83686ad to
fde814eCompareUh oh!
There was an error while loading. Please reload this page.
@ronag Should I remove all changes from outgoing and just commit the test? |
ronag
commented
May 10, 2020
Could you also add a test for the uint8array case? Also please fix the commit msg and PR description. |
3872384 to
33484b2Comparedont throw errors on Uint8Arrays and added test for all valid types Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de> fixup: remove dup fixup: remove unused dec fixup: add Uint8Array check in test fixup: don't throw invalid arg error on `Uint8Array`s
Http2Server.Response.writeUint8Arrays for http.ServerResponse#writenodejs-github-bot
commented
May 10, 2020
targos
commented
May 16, 2020
Landed in 2b50cd7 |
codebytere
commented
May 16, 2020
addaleax
commented
May 17, 2020
@codebytere Yes, it just needs to be applied in a different part of the function that #31818 had moved around (but not really introduced). @rexagod Would you be willing to backport this yourself? The guide for how to do that is in https://github.com/nodejs/node/blob/master/doc/guides/backporting-to-release-lines.md. If you’d prefer, you can also let us know that somebody else should pick that up. |
Don't throw errors on Uint8Arrays and added test for all valid types. Backport-PR-URL: nodejs#33488 PR-URL: nodejs#33155Fixes: nodejs#33379 Refs: nodejs#29829 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Don't throw errors on Uint8Arrays and added test for all valid types. Backport-PR-URL: nodejs#33490 PR-URL: nodejs#33155Fixes: nodejs#33379 Refs: nodejs#29829 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com>
rexagod
commented
May 20, 2020
ping @addaleax |
Don't throw errors on Uint8Arrays and added test for all valid types. Backport-PR-URL: #33490 PR-URL: #33155Fixes: #33379 Refs: #29829 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Don't throw errors on Uint8Arrays and added test for all valid types. Backport-PR-URL: #33490 PR-URL: #33155Fixes: #33379 Refs: #29829 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Don't throw errors on Uint8Arrays and added test for all valid types. Backport-PR-URL: #33488 PR-URL: #33155Fixes: #33379 Refs: #29829 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The title says http.ServerResponse#write |
Don't throw errors on Uint8Arrays and added test for all valid types. Backport-PR-URL: nodejs/node#33488 PR-URL: nodejs/node#33155Fixes: nodejs/node#33379 Refs: nodejs/node#29829 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Same as #33146 but for
writeRefs: #29829
Fixes: #33379
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes