-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
errors: alter and test ERR_TLS_REQUIRED_SERVER_NAME #19988
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
changes the base instance for ERR_TLS_REQUIRED_SERVER_NAME from Error to TypeError as a more accurate representation of the error and adds a unit test for missing servername input that triggers this error in Server.prototype.addContext
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,13 @@ const clientsOptions = [{ | |
| const serverResults = []; | ||
| const clientResults = []; | ||
|
|
||
| // check for throwing case where servername is not supplied | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Puncutate the comment, please (leading capital, trailing period). |
||
| common.expectsError(tls.createServer(serverOptions, () => {}).addContext, { | ||
| type: TypeError, | ||
| code: 'ERR_TLS_REQUIRED_SERVER_NAME', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not |
||
| message: '"servername" is a required parameter' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The argument is called
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally the variable name in the source code. I see the point here about using the documentation name though...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If docs and source code disagree, one or the other should be changed so they are in agreement. |
||
| }); | ||
|
|
||
| const server = tls.createServer(serverOptions, function(c) { | ||
| serverResults.push(c.servername); | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now unused and should be removed.