http: else case is not reachable by necccc · Pull Request #24176 · nodejs/node (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation17 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
While checking the arguments passed to http.Server, the case where
the options argument was of wrong type was not handled. Now it
throws an ERR_INVALID_ARG_TYPE error if the options argument is
not a function, object, null, or undefined.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes- tests and/or benchmarks are included
- commit message follows commit guidelines
While checking the arguments passed to http.Server, the case where the options argument was of wrong type was not handled. Now it throws an ERR_INVALID_ARG_TYPE error if the options argument is not a function, object, null, or undefined.
I am not sure if this commit on it's own is not already server major. If it is, we could make sure the check is already even stricter and solve the TODO as well.
addaleax added the semver-major
PRs that contain breaking changes and should be released in the next major version.
label
BridgeAR added the code-and-learn
Issues related to the Code-and-Learn events and PRs submitted during the events.
label
Not sure why the linter failed in here, there were no problems shown on my end :/
everything is ready for this PR to be landed except the semver-major
formalities - what are those? /cc @nodejs/tsc
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
everything is ready for this PR to be landed except the semver-major formalities - what are those?
2 TSC signoffs and a CITGM run.
I ran citgm-smoker, but don't know how to interpret results. Can someone?
citgm failed everywhere with:
06:50:38 fatal: ambiguous argument 'refs/pull/24176/head': unknown revision or path not in the working tree.
The problem is that you put refs/pull/24176/head
in the REBASE_ONTO parameter instead of GIT_REMOTE_REF.
This run should work: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1618/
@targos It looks like your CITGM run was terminated by @refack. Not sure if it's safe to restart it or if something needs to happen on the Build WG side first?
@targos@gireeshpunathil It looks like your CITGM run was terminated by @refack.
CITGM is broken - nodejs/citgm#618 (jobs do not finish, so there's no tap report. Only way to search for failures is to parse the 20MB log for each platform)
@targos - thanks for the correction. I never ran a citgm, just followed the comment in the build config, but missed the point that the comment explained the succeeding field, not the preceding one.
@refack - so, 1615 is a wrong run, 1618 is the right one - but that is aborted by you, so no tests were run actually? can you pls confirm? shall I start once again so that we can verify the result even if tap is unavailable?
also manually checking 20 MB * 16 looks like a terrible thing to do!
@nodejs/citgm Anyone willing to give a verdict on the CITGM results on this one?
I don't see anything alarming in the citgm results
Trott pushed a commit to Trott/io.js that referenced this pull request
While checking the arguments passed to http.Server, the case where the options argument was of wrong type was not handled. Now it throws an ERR_INVALID_ARG_TYPE error if the options argument is not a function, object, null, or undefined.
PR-URL: nodejs#24176 Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Reviewed-By: Gireesh Punathil gpunathi@in.ibm.com Reviewed-By: Matteo Collina matteo.collina@gmail.com Reviewed-By: Michaël Zasso targos@protonmail.com Reviewed-By: Trivikram Kamat trivikr.dev@gmail.com
BethGriggs added a commit that referenced this pull request
Notable changes:
- assert:
- async_hooks:
- bootstrap
- make Buffer and process non-enumerable (Ruben Bridgewater) #24874
- buffer:
- child_process:
- console:
- don't use ANSI escape codes when TERM=dumb (Vladislav Kaminsky) #26261
- crypto:
- deps:
- silence irrelevant V8 warning (Michaël Zasso) #26685
- update postmortem metadata generation script (cjihrig) #26685
- V8: un-cherry-pick bd019bd (Refael Ackermann) #26685
- V8: cherry-pick 6 commits (Michaël Zasso) #26685
- V8: cherry-pick d82c9af (Anna Henningsen) #26685
- V8: cherry-pick e5f01ba (Anna Henningsen) #26685
- V8: cherry-pick d5f08e4 (Anna Henningsen) #26685
- V8: cherry-pick 6b09d21 (Anna Henningsen) #26685
- V8: cherry-pick f0bb5d2 (Anna Henningsen) #26685
- V8: cherry-pick 5b0510d (Anna Henningsen) #26685
- V8: cherry-pick 91f0cd0 (Anna Henningsen) #26685
- V8: cherry-pick 392316d (Anna Henningsen) #26685
- V8: cherry-pick 2f79d68 (Anna Henningsen) #26685
- sync V8 gypfiles with 7.4 (Ujjwal Sharma) #26685
- update V8 to 7.4.288.13 (Ujjwal Sharma) #26685
- bump minimum icu version to 63 (Ujjwal Sharma) #25852
- silence irrelevant V8 warnings (Michaël Zasso) #25852
- V8: cherry-pick 7803fa6 (Jon Kunkee) #25852
- V8: cherry-pick 58cefed (Jon Kunkee) #25852
- V8: cherry-pick d3308d0 (Michaël Zasso) #25852
- V8: cherry-pick 74571c8 (Michaël Zasso) #25852
- cherry-pick fc0ddf5 from upstream V8 (Anna Henningsen) #25852
- sync V8 gypfiles with 7.3 (Ujjwal Sharma) #25852
- sync V8 gypfiles with 7.2 (Michaël Zasso) #25852
- update V8 to 7.3.492.25 (Michaël Zasso) #25852
- add s390 asm rules for OpenSSL-1.1.1 (Shigeki Ohtsu) #19794
- sync V8 gypfiles with 7.1 (Refael Ackermann) #23423
- update V8 to 7.1.302.28 (Michaël Zasso) #23423
- doc:
- errors:
- update error name (Ruben Bridgewater) #26738
- fs:
- http:
- lib:
- move DEP0021 to end of life (cjihrig) #27127
- remove Atomics.wake (Gus Caplan) #27033
- validate Error.captureStackTrace() calls (Ruben Bridgewater) #26738
- refactor Error.captureStackTrace() usage (Ruben Bridgewater) #26738
- move DTRACE_* probes out of global scope (James M Snell) #26541
- deprecate _stream_wrap (Sam Roberts) [#26245] (#26245)
- don't use
util.inspect()
internals (Ruben Bridgewater) #24971 - improve error message for MODULE_NOT_FOUND (Ali Ijaz Sheikh) #25690
- requireStack property for MODULE_NOT_FOUND (Ali Ijaz Sheikh) #25690
- move DEP0029 to end of life (cjihrig) #25377
- move DEP0028 to end of life (cjihrig) #25377
- move DEP0027 to end of life (cjihrig) #25377
- move DEP0026 to end of life (cjihrig) #25377
- move DEP0023 to end of life (cjihrig) #25280
- move DEP0006 to end of life (cjihrig) #25279
- remove unintended access to deps/ (Anna Henningsen) #25138
- move DEP0120 to end of life (cjihrig) #24862
- use ES6 class inheritance style (Ruben Bridgewater) #24755
- remove
inherits()
usage (Ruben Bridgewater) #24755
- module:
- n-api:
- remove code from error name (Ruben Bridgewater) #26738
- net:
- net,http2:
- merge setTimeout code (ZYSzys) #25084
- os:
- implement os.type() using uv_os_uname() (cjihrig) #25659
- process:
- readline:
- support TERM=dumb (Vladislav Kaminsky) #26261
- repl:
- src:
- remove unused INT_MAX constant (Sam Roberts) #27078
- update NODE_MODULE_VERSION to 72 (Ujjwal Sharma) #26685
- remove
AddPromiseHook()
(Anna Henningsen) #26574 - update NODE_MODULE_VERSION to 71 (Michaël Zasso) #25852
- clean up MultiIsolatePlatform interface (Anna Henningsen) #26384
- properly configure default heap limits (Ali Ijaz Sheikh) #25576
- remove icuDataDir from node config (GauthamBanasandra) #24780
- explicitly allow JS in ReadHostObject (Yang Guo) #23423
- update postmortem constant (cjihrig) #23423
- update NODE_MODULE_VERSION to 68 (Michaël Zasso) #23423
- tls:
- support TLSv1.3 (Sam Roberts) #26209
- return correct version from getCipher() (Sam Roberts) #26625
- check arg types of renegotiate() (Sam Roberts) #25876
- add code for ERR_TLS_INVALID_PROTOCOL_METHOD (Sam Roberts) #24729
- emit a warning when servername is an IP address (Rodger Combs) #23329
- disable TLS v1.0 and v1.1 by default (Ben Noordhuis) #23814
- remove unused arg to createSecureContext() (Sam Roberts) #24241
- deprecate Server.prototype.setOptions() (cjihrig) #23820
- load NODE_EXTRA_CA_CERTS at startup (Ouyang Yadong) #23354
- util:
- change inspect compact and breakLength default (Ruben Bridgewater) #27109
- improve inspect edge cases (Ruben Bridgewater) #27109
- only the first line of the error message (Simon Zünd) #26685
- don't set the prototype of callbackified functions (Ruben Bridgewater) #26893
- rename callbackified function (Ruben Bridgewater) #26893
- increase function length when using
callbackify()
(Ruben Bridgewater) #26893 - prevent tampering with internals in
inspect()
(Ruben Bridgewater) #26577 - fix proxy inspection (Ruben Bridgewater) #26241
- prevent leaking internal properties (Ruben Bridgewater) #24971
- protect against monkeypatched Object prototype for inspect() (Rich Trott) #25953
- treat format arguments equally (Roman Reiss) #23162
- win, fs:
- detect if symlink target is a directory (Bartosz Sosnowski) #23724
- zlib:
PR-URL: #26930
This was referenced
Apr 23, 2019
nodejs-github-bot pushed a commit that referenced this pull request
If options of http.Server is array, throw ERR_INVALID_ARG_TYPE.
Refs: #24176 PR-URL: #46283 Reviewed-By: Matteo Collina matteo.collina@gmail.com Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com Reviewed-By: Luigi Pinca luigipinca@gmail.com
abhishekumar-tyagi pushed a commit to abhishekumar-tyagi/node that referenced this pull request
If options of http.Server is array, throw ERR_INVALID_ARG_TYPE.
Refs: nodejs/node#24176
Reviewers
mcollina mcollina approved these changes
targos targos approved these changes
gireeshpunathil gireeshpunathil approved these changes
BridgeAR BridgeAR approved these changes
trivikr trivikr approved these changes
Labels
PRs that have at least one approval, no pending requests for changes, and a CI started.
Issues related to the Code-and-Learn events and PRs submitted during the events.
Issues or PRs related to the http subsystem.
PRs that contain breaking changes and should be released in the next major version.