Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc688bb

Browse filesBrowse files
sam-githubMylesBorins
authored andcommitted
doc: fix some inconsistent use of hostname
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>
1 parent 9052a22 commit cc688bb
Copy full SHA for cc688bb

File tree

Expand file treeCollapse file tree

3 files changed

+11
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+11
-10
lines changed
Open diff view settings
Collapse file

‎doc/api/async_hooks.md‎

Copy file name to clipboardExpand all lines: doc/api/async_hooks.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ of propagating what resource is responsible for the new resource's existence.
296296
been initialized. This can contain useful information that can vary based on
297297
the value of `type`. For instance, for the `GETADDRINFOREQWRAP` resource type,
298298
`resource` provides the hostname used when looking up the IP address for the
299-
hostname in `net.Server.listen()`. The API for accessing this information is
299+
host in `net.Server.listen()`. The API for accessing this information is
300300
currently not considered public, but using the Embedder API, users can provide
301301
and document their own resource objects. For example, such a resource object
302302
could contain the SQL query being executed.
Collapse file

‎doc/api/http.md‎

Copy file name to clipboardExpand all lines: doc/api/http.md
+7-7Lines changed: 7 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ proxy.listen(1337, '127.0.0.1', () => {
368368
// make a request to a tunneling proxy
369369
const options = {
370370
port: 1337,
371-
hostname: '127.0.0.1',
371+
host: '127.0.0.1',
372372
method: 'CONNECT',
373373
path: 'www.google.com:80'
374374
};
@@ -415,7 +415,7 @@ event is emitted with a callback containing an object with a status code.
415415
const http = require('http');
416416

417417
const options = {
418-
hostname: '127.0.0.1',
418+
host: '127.0.0.1',
419419
port: 8080,
420420
path: '/length_request'
421421
};
@@ -502,7 +502,7 @@ srv.listen(1337, '127.0.0.1', () => {
502502
// make a request
503503
const options = {
504504
port: 1337,
505-
hostname: '127.0.0.1',
505+
host: '127.0.0.1',
506506
headers: {
507507
'Connection': 'Upgrade',
508508
'Upgrade': 'websocket'
@@ -1924,14 +1924,14 @@ changes:
19241924
* `host` {string} A domain name or IP address of the server to issue the
19251925
request to. **Default:** `'localhost'`.
19261926
* `hostname` {string} Alias for `host`. To support [`url.parse()`][],
1927-
`hostname` is preferred over `host`.
1928-
* `family` {number} IP address family to use when resolving `host` and
1927+
`hostname` will be used if both `host` and `hostname` are specified.
1928+
* `family` {number} IP address family to use when resolving `host` or
19291929
`hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and
19301930
v6 will be used.
19311931
* `port` {number} Port of remote server. **Default:** `80`.
19321932
* `localAddress` {string} Local interface to bind for network connections.
1933-
* `socketPath` {string} Unix Domain Socket (use one of `host:port` or
1934-
`socketPath`).
1933+
* `socketPath` {string} Unix Domain Socket (cannot be used if one of `host`
1934+
or `port` is specified, those specify a TCP Socket).
19351935
* `method` {string} A string specifying the HTTP request method. **Default:**
19361936
`'GET'`.
19371937
* `path` {string} Request path. Should include query string if any.
Collapse file

‎doc/api/tls.md‎

Copy file name to clipboardExpand all lines: doc/api/tls.md
+3-2Lines changed: 3 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -799,14 +799,15 @@ decrease overall server throughput.
799799
added: v0.8.4
800800
-->
801801

802-
* `hostname` {string} The hostname to verify the certificate against
802+
* `hostname` {string} The host name or IP address to verify the certificate
803+
against.
803804
* `cert` {Object} An object representing the peer's certificate. The returned
804805
object has some properties corresponding to the fields of the certificate.
805806
* Returns: {Error|undefined}
806807

807808
Verifies the certificate `cert` is issued to `hostname`.
808809

809-
Returns {Error} object, populating it with the reason, host, and cert on
810+
Returns {Error} object, populating it with `reason`, `host`, and `cert` on
810811
failure. On success, returns {undefined}.
811812

812813
This function can be overwritten by providing alternative function as part of

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.