Skip to content
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

doc: fix some inconsistent use of hostname #24199

Conversation

sam-github
Copy link
Contributor

host names are DNS names, host addresses are IP addresses, and host
arguments and options can be either.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

@sam-github sam-github requested a review from Trott November 6, 2018 18:01
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Nov 6, 2018
doc/api/http.md Outdated Show resolved Hide resolved
@sam-github sam-github force-pushed the tidy-host-vs-hostname-inconsistencies branch from 12995ae to 5b064f3 Compare November 6, 2018 18:46
@lpinca
Copy link
Member

lpinca commented Nov 6, 2018

I think there reason why we decided to normalize everything to hostname (we did it in a "recent" PR if I remember correctly) is:

const url = new URL('http://127.0.0.1:8080/');

console.log(url.host); // => 127.0.0.1:8080
console.log(url.hostname); // => 127.0.0.1

@addaleax
Copy link
Member

addaleax commented Nov 6, 2018

(I think the PR that @lpinca is referring to is #23572, just for context.)

@sam-github
Copy link
Contributor Author

I agee with #23572, this is continuation of it. The DNS APIs changed there accept host names (and not addresses). Which isn't actually like URL parsing at all, since URls can have addresses or host names in the hostname field (not that that's relevant to these changes).

@lpinca perhaps you can comment more specifically on some of the changes I propose? I know its a mixture of changes, from fixing unclear docs, to actual typos, or just what I consider to be oddities in examples, so if there are specific ones you think don't make sense that would help.

Btw, I don't know what normalize means, but it is certainly not the case that all uses of host were replaced with hostname, see https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback

doc/api/tls.md Outdated Show resolved Hide resolved
@sam-github sam-github force-pushed the tidy-host-vs-hostname-inconsistencies branch from 5b064f3 to 8f13453 Compare November 7, 2018 17:15
@sam-github
Copy link
Contributor Author

I think I addressed the comments, can I have a re-review?

@sam-github sam-github force-pushed the tidy-host-vs-hostname-inconsistencies branch from 970c394 to 81e8772 Compare November 9, 2018 16:49
host names are DNS names, host addresses are IP addresses, and `host`
arguments and options can be either.
@sam-github sam-github force-pushed the tidy-host-vs-hostname-inconsistencies branch from 81e8772 to 3774bf6 Compare November 9, 2018 18:49
@sam-github
Copy link
Contributor Author

@sam-github
Copy link
Contributor Author

Trott pushed a commit to Trott/io.js that referenced this pull request Nov 10, 2018
host names are DNS names, host addresses are IP addresses, and `host`
arguments and options can be either.

PR-URL: nodejs#24199
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Trott
Copy link
Member

Trott commented Nov 10, 2018

Landed in 3833d69.

@Trott Trott closed this Nov 10, 2018
BridgeAR pushed a commit that referenced this pull request Nov 14, 2018
host names are DNS names, host addresses are IP addresses, and `host`
arguments and options can be either.

PR-URL: #24199
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
kiyomizumia pushed a commit to kiyomizumia/node that referenced this pull request Nov 15, 2018
host names are DNS names, host addresses are IP addresses, and `host`
arguments and options can be either.

PR-URL: nodejs#24199
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@sam-github sam-github deleted the tidy-host-vs-hostname-inconsistencies branch November 27, 2018 22:01
codebytere pushed a commit that referenced this pull request Dec 13, 2018
host names are DNS names, host addresses are IP addresses, and `host`
arguments and options can be either.

PR-URL: #24199
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 26, 2018
host names are DNS names, host addresses are IP addresses, and `host`
arguments and options can be either.

PR-URL: #24199
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@codebytere codebytere mentioned this pull request Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants