summaryrefslogtreecommitdiff
path: root/typings
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-03-28 11:29:01 -0700
committerRich Trott <rtrott@gmail.com>2021-04-08 05:20:01 -0700
commit0da7a11e543f17617caf5ac0baf0773cbee35625 (patch)
treea2eb73cd3cbd43d0636e3b073c60bc24d852983b /typings
parentb16e79e05b90589669ef87b5528ee143c9d086cc (diff)
downloadnode-new-0da7a11e543f17617caf5ac0baf0773cbee35625.tar.gz
test,http: check that http server is robust from handler abuse
The only way I could find to complete coverage for _http_common.js is to use semi-private (exposed but probably shouldn't be) handlers to get the state into something weird. With the if-condition being checked (see Refs) commented out, I get this result from this test: ``` node:_http_common:140 if (len > 0 && !stream._dumped) { ^ TypeError: Cannot read property '_dumped' of null at HTTPParser.parserOnBody (node:_http_common:140:26) ``` With the check in place, the test passes without an error. Seems like quite the edge case, but I'm going to assume it's there for a reason. Refs: https://coverage.nodejs.org/coverage-b560645d6b0a4bed/lib/_http_common.js.html#L137 PR-URL: https://github.com/nodejs/node/pull/37958 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'typings')
0 files changed, 0 insertions, 0 deletions