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 }})

necccc

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

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.

BridgeAR

@BridgeAR

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 addaleax added the semver-major

PRs that contain breaking changes and should be released in the next major version.

label

Nov 6, 2018

@BridgeAR BridgeAR added the code-and-learn

Issues related to the Code-and-Learn events and PRs submitted during the events.

label

Nov 6, 2018

@necccc

Not sure why the linter failed in here, there were no problems shown on my end :/

gireeshpunathil

@gireeshpunathil

@gireeshpunathil

everything is ready for this PR to be landed except the semver-major formalities - what are those? /cc @nodejs/tsc

mcollina

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcollina

everything is ready for this PR to be landed except the semver-major formalities - what are those?

2 TSC signoffs and a CITGM run.

targos

@gireeshpunathil

@gireeshpunathil

I ran citgm-smoker, but don't know how to interpret results. Can someone?

@targos

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/

trivikr

@Trott

@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?

@refack

@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)

@gireeshpunathil

@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?

@gireeshpunathil

also manually checking 20 MB * 16 looks like a terrible thing to do!

@refack

@Trott

@nodejs/citgm Anyone willing to give a verdict on the CITGM results on this one?

@targos

I don't see anything alarming in the citgm results

@Trott

Trott pushed a commit to Trott/io.js that referenced this pull request

Nov 15, 2018

@Trott

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

Apr 22, 2019

@BethGriggs

Notable changes:

PR-URL: #26930

This was referenced

Apr 23, 2019

nodejs-github-bot pushed a commit that referenced this pull request

Jan 25, 2023

@deokjinkim

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

May 5, 2024

@deokjinkim

If options of http.Server is array, throw ERR_INVALID_ARG_TYPE.

Refs: nodejs/node#24176

Reviewers

@mcollina mcollina mcollina approved these changes

@targos targos targos approved these changes

@gireeshpunathil gireeshpunathil gireeshpunathil approved these changes

@BridgeAR BridgeAR BridgeAR approved these changes

@trivikr trivikr trivikr approved these changes

Labels

author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

code-and-learn

Issues related to the Code-and-Learn events and PRs submitted during the events.

http

Issues or PRs related to the http subsystem.

semver-major

PRs that contain breaking changes and should be released in the next major version.