-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
https: make opts optional & immutable when create #13599
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
Closed
XadillaX
wants to merge
8
commits into
nodejs:master
from
XadillaX:feature/https-optional-immutable-opt
Closed
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
26d4efb
https: make opts optional & immutable when create
XadillaX 2c7ff7b
use Object.assign to instead of util._extend
XadillaX b3a1ac6
use the default message in common.mustNotCall
XadillaX 9414765
update after reviewing
XadillaX c798af8
add test case for no argument
XadillaX 5de8cf2
use blocks to instead of server1, server2, ...
XadillaX dc2291c
add test skip
XadillaX 2232fad
delete default param to prevent some breaking changes
XadillaX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use the default message in common.mustNotCall
- Loading branch information
commit b3a1ac6e7f357063c14126a1e4bf1dac76130303
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ const server1 = https.createServer(opts); | |
| assert.deepStrictEqual(opts, { foo: 'bar' }); | ||
| assert.strictEqual(server1.NPNProtocols.compare(dftProtocol.NPNProtocols), 0); | ||
|
|
||
| const mustNotCall = common.mustNotCall('dummy callback'); | ||
| const mustNotCall = common.mustNotCall(); | ||
| const server2 = https.createServer(mustNotCall); | ||
|
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. The comment below doesn't match the behavior of this line. If we're testing no arguments, it should just be Otherwise we could add a separate test below for no arguments. |
||
|
|
||
| assert.strictEqual(server2.NPNProtocols.compare(dftProtocol.NPNProtocols), 0); | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
I think it should suffice to just compare the
NPNProtocolsreferences. That way we know for sure that our options weren't overridden: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.
@mscdex I think we can't, because
NPNProtocolshasn't been cached yet. 2 calls totls.convertNPNProtocolswon't return the same reference.Uh oh!
There was an error while loading. Please reload this page.
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.
Ah ok I see it now. Perhaps we should at least choose a different set of protocols then, so as to differentiate from the default NPN protocols (perhaps just use one protocol?).