test: http2 util passing array in te header#16246
test: http2 util passing array in te header#16246trivikr wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Just a note for future reference if someone wants to take it on, the pathway this is testing could actually be refactored a bit: node/lib/internal/http2/util.js Lines 363 to 364 in ff747e3
node/lib/internal/http2/util.js Lines 405 to 416 in ff747e3 so it could just be rewritten as: return value !== 'trailers'; |
|
Thanks @apapirovski, I've updated the commit to add return value.toString() !== 'trailers';Commit is at trivikr@596df98 |
7b2c4ef to
596df98
Compare
lib/internal/http2/util.js
Outdated
There was a problem hiding this comment.
toString() isn't necessary here (and is bad for perf). If an array slips through then it won't match anyway (because it has at least two items in it). Should just be value !== 'trailers'.
There was a problem hiding this comment.
removed toString() in the updated commit
This adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader Refs: nodejs#14985
596df98 to
9a03c2a
Compare
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: nodejs#16246 Refs: nodejs#14985 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
|
Landed in 1fd662c |
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: #16246 Refs: #14985 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: nodejs/node#16246 Refs: nodejs/node#14985 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: nodejs/node#16246 Refs: nodejs/node#14985 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader:
node/lib/internal/http2/util.js
Line 363 in 212de3c
Refs: #14985
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test, http2