Skip to content

Commit f59eab0

Browse files
TimothyGuMylesBorins
authored andcommitted
doc: rename HTTP2 to HTTP/2
Previously, "HTTP/2" was strictly used to describe the protocol, and HTTP2 the module. This distinction is deemed unnecessary, and consistency between the two terms is enforced. Backport-PR-URL: #20456 PR-URL: #19603 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
1 parent e4c10e1 commit f59eab0

File tree

2 files changed

+32
-34
lines changed

2 files changed

+32
-34
lines changed

doc/api/http2.md

+30-32
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# HTTP2
1+
# HTTP/2
22

33
<!--introduced_in=v8.4.0-->
44

@@ -230,7 +230,7 @@ added: v8.4.0
230230

231231
The `'stream'` event is emitted when a new `Http2Stream` is created. When
232232
invoked, the handler function will receive a reference to the `Http2Stream`
233-
object, a [HTTP2 Headers Object][], and numeric flags associated with the
233+
object, a [HTTP/2 Headers Object][], and numeric flags associated with the
234234
creation of the stream.
235235

236236
```js
@@ -383,7 +383,7 @@ Transmits a `GOAWAY` frame to the connected peer *without* shutting down the
383383
added: v8.4.0
384384
-->
385385

386-
* Value: {HTTP2 Settings Object}
386+
* Value: {HTTP/2 Settings Object}
387387

388388
A prototype-less object describing the current local settings of this
389389
`Http2Session`. The local settings are local to *this* `Http2Session` instance.
@@ -462,7 +462,7 @@ instance's underlying [`net.Socket`].
462462
added: v8.4.0
463463
-->
464464

465-
* Value: {HTTP2 Settings Object}
465+
* Value: {HTTP/2 Settings Object}
466466

467467
A prototype-less object describing the current remote settings of this
468468
`Http2Session`. The remote settings are set by the *connected* HTTP/2 peer.
@@ -533,8 +533,7 @@ An object describing the current status of this `Http2Session`.
533533
added: v8.4.0
534534
-->
535535

536-
* `settings` {HTTP2 Settings Object}
537-
* Returns {undefined}
536+
* `settings` {HTTP/2 Settings Object}
538537

539538
Updates the current local settings for this `Http2Session` and sends a new
540539
`SETTINGS` frame to the connected HTTP/2 peer.
@@ -674,7 +673,7 @@ client.on('altsvc', (alt, origin, streamId) => {
674673
added: v8.4.0
675674
-->
676675

677-
* `headers` {HTTP2 Headers Object}
676+
* `headers` {HTTP/2 Headers Object}
678677
* `options` {Object}
679678
* `endStream` {boolean} `true` if the `Http2Stream` *writable* side should
680679
be closed initially, such as when sending a `GET` request that should not
@@ -862,7 +861,7 @@ added: v8.4.0
862861

863862
The `'trailers'` event is emitted when a block of headers associated with
864863
trailing header fields is received. The listener callback is passed the
865-
[HTTP2 Headers Object][] and flags associated with the headers.
864+
[HTTP/2 Headers Object][] and flags associated with the headers.
866865

867866
```js
868867
stream.on('trailers', (headers, flags) => {
@@ -961,7 +960,7 @@ calling `http2stream.close()`, or `http2stream.destroy()`. Will be
961960
added: REPLACEME
962961
-->
963962

964-
* Value: {HTTP2 Headers Object}
963+
* Value: {HTTP/2 Headers Object}
965964

966965
An object containing the outbound headers sent for this `Http2Stream`.
967966

@@ -970,7 +969,7 @@ An object containing the outbound headers sent for this `Http2Stream`.
970969
added: REPLACEME
971970
-->
972971

973-
* Value: {HTTP2 Headers Object[]}
972+
* Value: {HTTP/2 Headers Object[]}
974973

975974
An array of objects containing the outbound informational (additional) headers
976975
sent for this `Http2Stream`.
@@ -980,7 +979,7 @@ sent for this `Http2Stream`.
980979
added: REPLACEME
981980
-->
982981

983-
* Value: {HTTP2 Headers Object}
982+
* Value: {HTTP/2 Headers Object}
984983

985984
An object containing the outbound trailers sent for this this `HttpStream`.
986985

@@ -1063,7 +1062,7 @@ added: v8.4.0
10631062

10641063
The `'headers'` event is emitted when an additional block of headers is received
10651064
for a stream, such as when a block of `1xx` informational headers is received.
1066-
The listener callback is passed the [HTTP2 Headers Object][] and flags
1065+
The listener callback is passed the [HTTP/2 Headers Object][] and flags
10671066
associated with the headers.
10681067

10691068
```js
@@ -1078,7 +1077,7 @@ added: v8.4.0
10781077
-->
10791078

10801079
The `'push'` event is emitted when response headers for a Server Push stream
1081-
are received. The listener callback is passed the [HTTP2 Headers Object][] and
1080+
are received. The listener callback is passed the [HTTP/2 Headers Object][] and
10821081
flags associated with the headers.
10831082

10841083
```js
@@ -1095,7 +1094,7 @@ added: v8.4.0
10951094
The `'response'` event is emitted when a response `HEADERS` frame has been
10961095
received for this stream from the connected HTTP/2 server. The listener is
10971096
invoked with two arguments: an Object containing the received
1098-
[HTTP2 Headers Object][], and flags associated with the headers.
1097+
[HTTP/2 Headers Object][], and flags associated with the headers.
10991098

11001099
For example:
11011100

@@ -1125,8 +1124,7 @@ provide additional methods such as `http2stream.pushStream()` and
11251124
added: v8.4.0
11261125
-->
11271126

1128-
* `headers` {HTTP2 Headers Object}
1129-
* Returns: {undefined}
1127+
* `headers` {HTTP/2 Headers Object}
11301128

11311129
Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.
11321130

@@ -1156,7 +1154,7 @@ accepts push streams, `false` otherwise. Settings are the same for every
11561154
added: v8.4.0
11571155
-->
11581156

1159-
* `headers` {HTTP2 Headers Object}
1157+
* `headers` {HTTP/2 Headers Object}
11601158
* `options` {Object}
11611159
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
11621160
the created stream is made the sole direct dependency of the parent, with
@@ -1168,7 +1166,7 @@ added: v8.4.0
11681166
initiated.
11691167
* `err` {Error}
11701168
* `pushStream` {ServerHttp2Stream} The returned pushStream object.
1171-
* `headers` {HTTP2 Headers Object} Headers object the pushStream was
1169+
* `headers` {HTTP/2 Headers Object} Headers object the pushStream was
11721170
initiated with.
11731171
* Returns: {undefined}
11741172

@@ -1199,7 +1197,7 @@ a `weight` value to `http2stream.priority` with the `silent` option set to
11991197
added: v8.4.0
12001198
-->
12011199

1202-
* `headers` {HTTP2 Headers Object}
1200+
* `headers` {HTTP/2 Headers Object}
12031201
* `options` {Object}
12041202
* `endStream` {boolean} Set to `true` to indicate that the response will not
12051203
include payload data.
@@ -1245,7 +1243,7 @@ added: v8.4.0
12451243
-->
12461244

12471245
* `fd` {number} A readable file descriptor.
1248-
* `headers` {HTTP2 Headers Object}
1246+
* `headers` {HTTP/2 Headers Object}
12491247
* `options` {Object}
12501248
* `statCheck` {Function}
12511249
* `getTrailers` {Function} Callback function invoked to collect trailer
@@ -1336,7 +1334,7 @@ added: v8.4.0
13361334
-->
13371335

13381336
* `path` {string|Buffer|URL}
1339-
* `headers` {HTTP2 Headers Object}
1337+
* `headers` {HTTP/2 Headers Object}
13401338
* `options` {Object}
13411339
* `statCheck` {Function}
13421340
* `onError` {Function} Callback function invoked in the case of an
@@ -1712,7 +1710,7 @@ changes:
17121710
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
17131711
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
17141712
used to determine the padding. See [Using options.selectPadding][].
1715-
* `settings` {HTTP2 Settings Object} The initial settings to send to the
1713+
* `settings` {HTTP/2 Settings Object} The initial settings to send to the
17161714
remote peer upon connection.
17171715
* `onRequestHandler` {Function} See [Compatibility API][]
17181716
* Returns: {Http2Server}
@@ -1807,7 +1805,7 @@ changes:
18071805
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
18081806
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
18091807
used to determine the padding. See [Using options.selectPadding][].
1810-
* `settings` {HTTP2 Settings Object} The initial settings to send to the
1808+
* `settings` {HTTP/2 Settings Object} The initial settings to send to the
18111809
remote peer upon connection.
18121810
* ...: Any [`tls.createServer()`][] options can be provided. For
18131811
servers, the identity options (`pfx` or `key`/`cert`) are usually required.
@@ -1903,7 +1901,7 @@ changes:
19031901
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
19041902
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
19051903
used to determine the padding. See [Using options.selectPadding][].
1906-
* `settings` {HTTP2 Settings Object} The initial settings to send to the
1904+
* `settings` {HTTP/2 Settings Object} The initial settings to send to the
19071905
remote peer upon connection.
19081906
* `createConnection` {Function} An optional callback that receives the `URL`
19091907
instance passed to `connect` and the `options` object, and returns any
@@ -1956,7 +1954,7 @@ a given number of milliseconds set using `http2server.setTimeout()`.
19561954
added: v8.4.0
19571955
-->
19581956

1959-
* Returns: {HTTP2 Settings Object}
1957+
* Returns: {HTTP/2 Settings Object}
19601958

19611959
Returns an object containing the default settings for an `Http2Session`
19621960
instance. This method returns a new object instance every time it is called
@@ -1967,7 +1965,7 @@ so instances returned may be safely modified for use.
19671965
added: v8.4.0
19681966
-->
19691967

1970-
* `settings` {HTTP2 Settings Object}
1968+
* `settings` {HTTP/2 Settings Object}
19711969
* Returns: {Buffer}
19721970

19731971
Returns a `Buffer` instance containing serialized representation of the given
@@ -1989,9 +1987,9 @@ added: v8.4.0
19891987
-->
19901988

19911989
* `buf` {Buffer|Uint8Array} The packed settings.
1992-
* Returns: {HTTP2 Settings Object}
1990+
* Returns: {HTTP/2 Settings Object}
19931991

1994-
Returns a [HTTP2 Settings Object][] containing the deserialized settings from
1992+
Returns a [HTTP/2 Settings Object][] containing the deserialized settings from
19951993
the given `Buffer` as generated by `http2.getPackedSettings()`.
19961994

19971995
### Headers Object
@@ -2256,7 +2254,7 @@ In order to create a mixed [HTTPS][] and HTTP/2 server, refer to the
22562254
[ALPN negotiation][] section.
22572255
Upgrading from non-tls HTTP/1 servers is not supported.
22582256

2259-
The HTTP2 compatibility API is composed of [`Http2ServerRequest`]() and
2257+
The HTTP/2 compatibility API is composed of [`Http2ServerRequest`]() and
22602258
[`Http2ServerResponse`](). They aim at API compatibility with HTTP/1, but
22612259
they do not hide the differences between the protocols. As an example,
22622260
the status message for HTTP codes is ignored.
@@ -2364,7 +2362,7 @@ Example:
23642362
console.log(request.headers);
23652363
```
23662364

2367-
See [HTTP2 Headers Object][].
2365+
See [HTTP/2 Headers Object][].
23682366

23692367
*Note*: In HTTP/2, the request path, hostname, protocol, and method are
23702368
represented as special headers prefixed with the `:` character (e.g. `':path'`).
@@ -3087,8 +3085,8 @@ following additional properties:
30873085
[HTTP/1]: http.html
30883086
[HTTP/2]: https://tools.ietf.org/html/rfc7540
30893087
[HTTP/2 Unencrypted]: https://http2.github.io/faq/#does-http2-require-encryption
3090-
[HTTP2 Headers Object]: #http2_headers_object
3091-
[HTTP2 Settings Object]: #http2_settings_object
3088+
[HTTP/2 Headers Object]: #http2_headers_object
3089+
[HTTP/2 Settings Object]: #http2_settings_object
30923090
[HTTPS]: https.html
30933091
[Http2Session and Sockets]: #http2_http2session_and_sockets
30943092
[Performance Observer]: perf_hooks.html

tools/doc/type-parser.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const typeMap = {
5454
'http.ServerResponse': 'http.html#http_class_http_serverresponse',
5555

5656
'ClientHttp2Stream': 'http2.html#http2_class_clienthttp2stream',
57-
'HTTP2 Headers Object': 'http2.html#http2_headers_object',
58-
'HTTP2 Settings Object': 'http2.html#http2_settings_object',
57+
'HTTP/2 Headers Object': 'http2.html#http2_headers_object',
58+
'HTTP/2 Settings Object': 'http2.html#http2_settings_object',
5959
'http2.Http2ServerRequest': 'http2.html#http2_class_http2_http2serverrequest',
6060
'http2.Http2ServerResponse':
6161
'http2.html#http2_class_http2_http2serverresponse',

0 commit comments

Comments
 (0)