| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
maybe make these const since you're in here anyway?
Sorry, something went wrong.
|
Generally that sounds ok to me, but can you describe the issues a bit? |
Sorry, something went wrong.
|
The issue is that it isn't supported on all platforms and we end up with hacks just to set the flag on connections. In most cases this probably isn't needed at all, and being explicit would probably be better. Some reference issues: |
Sorry, something went wrong.
|
LGTM. IIRC, the deeper issue is that we set AI_V4MAPPED indiscriminately instead of only when family === 6. |
Sorry, something went wrong.
|
@bnoordhuis yea, that was one of the issues. It's also not supported on FreeBSD and Android. Would you be OK with making hints explicit in a semver major? |
Sorry, something went wrong.
|
You mean making it a required argument period or required when you want to set AI_V4MAPPED? The latter is okay, I think, although there may be some fallout and it pushes the burden of dealing with platform inconsistencies to user land. |
Sorry, something went wrong.
I meant removing this block and making hints strictly optional. I suppose another alternative is to make the change suggested in #5436 and only set V4MAPPED when the flag is supported by the platform and the family is explicitly set to 6. |
Sorry, something went wrong.
This commit adds support for passing DNS lookup hints to createConnection(). PR-URL: nodejs#6000 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Right. I think it's a good idea in that it means less implicit behavior and more mechanism over policy. However, we've been shipping this code for a while so we should test that it doesn't break to much. @thealphanerd can probably help with that. |
Sorry, something went wrong.
|
OK, I'll put together a PR that can be run through CITGM. |
Sorry, something went wrong.
|
CI for this PR: https://ci.nodejs.org/job/node-test-pull-request/2123/ UPDATE: First run had one failure, which may have been flakey. Trying again: https://ci.nodejs.org/job/node-test-pull-request/2125/ |
Sorry, something went wrong.
|
@cjihrig .. thanks .. yeah, I think I'm +1 on it also. this change LGTM if CI is green. Will watch for the other PR! |
Sorry, something went wrong.
This commit adds support for passing DNS lookup hints to createConnection(). PR-URL: #6000 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
|
@cjihrig the tests are failing when this commit is cherry-picked to v5.x assert.js:330
throw actual;
^
TypeError: invalid argument: hints must use valid flags
at lookup (dns.js:129:13)
at lookupAndConnect (net.js:963:3)
at Socket.connect (net.js:903:5)
at Object.exports.connect.exports.createConnection (net.js:69:35)
at /Users/thealphanerd/code/node/master/test/parallel/test-net-create-connection.js:26:11
at _tryBlock (assert.js:296:5)
at _throws (assert.js:315:12)
at Function.assert.throws (assert.js:338:3)
at fail (/Users/thealphanerd/code/node/master/test/parallel/test-net-create-connection.js:25:12)
at Server.<anonymous> (/Users/thealphanerd/code/node/master/test/parallel/test-net-create-connection.js:92:3)
|
Sorry, something went wrong.
|
Looks like the error message in lib/dns.js is different across the branches: Can you give that a shot in the test? |
Sorry, something went wrong.
|
@cjihrig I already tried updating the error message. The error as included above was the new test failing |
Sorry, something went wrong.
This commit adds support for passing DNS lookup hints to createConnection(). PR-URL: nodejs#6000 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Conflicts: test/parallel/test-net-create-connection.js
|
@thealphanerd worked fine for me. See #6061 |
Sorry, something went wrong.
This commit adds support for passing DNS lookup hints to createConnection(). PR-URL: #6000 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Conflicts: test/parallel/test-net-create-connection.js
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behavior was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069 PR-URL: #6322
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069 PR-URL: #6322
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) nodejs#5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) nodejs#6279 * update ESLint to 2.7.0 (silverwind) nodejs#6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) nodejs#6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) nodejs#6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) nodejs#6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) nodejs#6090 src: * add SIGINFO to supported signals (James Reggio) nodejs#6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) nodejs#6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) nodejs#6069 PR-URL: nodejs#6322
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069 PR-URL: #6322
| Back | FazBrowse Home | New Git URL |
Pull Request check-list
Please make sure to review and check all of these items:
this change (including linting)?
existing APIs, or introduces new ones)?
Affected core subsystem(s)
net
Description of change
This commit adds support for passing DNS lookup hints to createConnection().
This PR is semver minor, but I'd like to toss out the idea of a semver major change where no DNS hints are implicitly set. Instead, users could specify hints if necessary. My motivation is a number of issues related to varying support of V4MAPPED. Thoughts @bnoordhuis / @indutny?