Skip to content

Commit 9396b77

Browse files
TimothyGutrivikr
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. 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 189eaa0 commit 9396b77

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

doc/api/http2.md

+30-30
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

@@ -229,7 +229,7 @@ added: v8.4.0
229229

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

235235
```js
@@ -381,7 +381,7 @@ Transmits a `GOAWAY` frame to the connected peer *without* shutting down the
381381
added: v8.4.0
382382
-->
383383

384-
* Value: {HTTP2 Settings Object}
384+
* Value: {HTTP/2 Settings Object}
385385

386386
A prototype-less object describing the current local settings of this
387387
`Http2Session`. The local settings are local to *this* `Http2Session` instance.
@@ -460,7 +460,7 @@ instance's underlying [`net.Socket`].
460460
added: v8.4.0
461461
-->
462462

463-
* Value: {HTTP2 Settings Object}
463+
* Value: {HTTP/2 Settings Object}
464464

465465
A prototype-less object describing the current remote settings of this
466466
`Http2Session`. The remote settings are set by the *connected* HTTP/2 peer.
@@ -530,7 +530,7 @@ An object describing the current status of this `Http2Session`.
530530
added: v8.4.0
531531
-->
532532

533-
* `settings` {HTTP2 Settings Object}
533+
* `settings` {HTTP/2 Settings Object}
534534

535535
Updates the current local settings for this `Http2Session` and sends a new
536536
`SETTINGS` frame to the connected HTTP/2 peer.
@@ -669,7 +669,7 @@ client.on('altsvc', (alt, origin, streamId) => {
669669
added: v8.4.0
670670
-->
671671

672-
* `headers` {HTTP2 Headers Object}
672+
* `headers` {HTTP/2 Headers Object}
673673
* `options` {Object}
674674
* `endStream` {boolean} `true` if the `Http2Stream` *writable* side should
675675
be closed initially, such as when sending a `GET` request that should not
@@ -855,7 +855,7 @@ added: v8.4.0
855855

856856
The `'trailers'` event is emitted when a block of headers associated with
857857
trailing header fields is received. The listener callback is passed the
858-
[HTTP2 Headers Object][] and flags associated with the headers.
858+
[HTTP/2 Headers Object][] and flags associated with the headers.
859859

860860
```js
861861
stream.on('trailers', (headers, flags) => {
@@ -952,7 +952,7 @@ calling `http2stream.close()`, or `http2stream.destroy()`. Will be
952952
added: v9.5.0
953953
-->
954954

955-
* Value: {HTTP2 Headers Object}
955+
* Value: {HTTP/2 Headers Object}
956956

957957
An object containing the outbound headers sent for this `Http2Stream`.
958958

@@ -961,7 +961,7 @@ An object containing the outbound headers sent for this `Http2Stream`.
961961
added: v9.5.0
962962
-->
963963

964-
* Value: {HTTP2 Headers Object[]}
964+
* Value: {HTTP/2 Headers Object[]}
965965

966966
An array of objects containing the outbound informational (additional) headers
967967
sent for this `Http2Stream`.
@@ -971,7 +971,7 @@ sent for this `Http2Stream`.
971971
added: v9.5.0
972972
-->
973973

974-
* Value: {HTTP2 Headers Object}
974+
* Value: {HTTP/2 Headers Object}
975975

976976
An object containing the outbound trailers sent for this this `HttpStream`.
977977

@@ -1053,7 +1053,7 @@ added: v8.4.0
10531053

10541054
The `'headers'` event is emitted when an additional block of headers is received
10551055
for a stream, such as when a block of `1xx` informational headers is received.
1056-
The listener callback is passed the [HTTP2 Headers Object][] and flags
1056+
The listener callback is passed the [HTTP/2 Headers Object][] and flags
10571057
associated with the headers.
10581058

10591059
```js
@@ -1068,7 +1068,7 @@ added: v8.4.0
10681068
-->
10691069

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

10741074
```js
@@ -1085,7 +1085,7 @@ added: v8.4.0
10851085
The `'response'` event is emitted when a response `HEADERS` frame has been
10861086
received for this stream from the connected HTTP/2 server. The listener is
10871087
invoked with two arguments: an Object containing the received
1088-
[HTTP2 Headers Object][], and flags associated with the headers.
1088+
[HTTP/2 Headers Object][], and flags associated with the headers.
10891089

10901090
```js
10911091
const http2 = require('http2');
@@ -1113,7 +1113,7 @@ provide additional methods such as `http2stream.pushStream()` and
11131113
added: v8.4.0
11141114
-->
11151115

1116-
* `headers` {HTTP2 Headers Object}
1116+
* `headers` {HTTP/2 Headers Object}
11171117

11181118
Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.
11191119

@@ -1143,7 +1143,7 @@ accepts push streams, `false` otherwise. Settings are the same for every
11431143
added: v8.4.0
11441144
-->
11451145

1146-
* `headers` {HTTP2 Headers Object}
1146+
* `headers` {HTTP/2 Headers Object}
11471147
* `options` {Object}
11481148
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
11491149
the created stream is made the sole direct dependency of the parent, with
@@ -1155,7 +1155,7 @@ added: v8.4.0
11551155
initiated.
11561156
* `err` {Error}
11571157
* `pushStream` {ServerHttp2Stream} The returned pushStream object.
1158-
* `headers` {HTTP2 Headers Object} Headers object the pushStream was
1158+
* `headers` {HTTP/2 Headers Object} Headers object the pushStream was
11591159
initiated with.
11601160

11611161
Initiates a push stream. The callback is invoked with the new `Http2Stream`
@@ -1185,7 +1185,7 @@ a `weight` value to `http2stream.priority` with the `silent` option set to
11851185
added: v8.4.0
11861186
-->
11871187

1188-
* `headers` {HTTP2 Headers Object}
1188+
* `headers` {HTTP/2 Headers Object}
11891189
* `options` {Object}
11901190
* `endStream` {boolean} Set to `true` to indicate that the response will not
11911191
include payload data.
@@ -1234,7 +1234,7 @@ changes:
12341234
-->
12351235

12361236
* `fd` {number} A readable file descriptor.
1237-
* `headers` {HTTP2 Headers Object}
1237+
* `headers` {HTTP/2 Headers Object}
12381238
* `options` {Object}
12391239
* `statCheck` {Function}
12401240
* `getTrailers` {Function} Callback function invoked to collect trailer
@@ -1329,7 +1329,7 @@ changes:
13291329
-->
13301330

13311331
* `path` {string|Buffer|URL}
1332-
* `headers` {HTTP2 Headers Object}
1332+
* `headers` {HTTP/2 Headers Object}
13331333
* `options` {Object}
13341334
* `statCheck` {Function}
13351335
* `onError` {Function} Callback function invoked in the case of an
@@ -1708,7 +1708,7 @@ changes:
17081708
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
17091709
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
17101710
used to determine the padding. See [Using options.selectPadding][].
1711-
* `settings` {HTTP2 Settings Object} The initial settings to send to the
1711+
* `settings` {HTTP/2 Settings Object} The initial settings to send to the
17121712
remote peer upon connection.
17131713
* `Http1IncomingMessage` {http.IncomingMessage} Specifies the IncomingMessage
17141714
class to used for HTTP/1 fallback. Useful for extending the original
@@ -1817,7 +1817,7 @@ changes:
18171817
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
18181818
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
18191819
used to determine the padding. See [Using options.selectPadding][].
1820-
* `settings` {HTTP2 Settings Object} The initial settings to send to the
1820+
* `settings` {HTTP/2 Settings Object} The initial settings to send to the
18211821
remote peer upon connection.
18221822
* ...: Any [`tls.createServer()`][] options can be provided. For
18231823
servers, the identity options (`pfx` or `key`/`cert`) are usually required.
@@ -1913,7 +1913,7 @@ changes:
19131913
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
19141914
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
19151915
used to determine the padding. See [Using options.selectPadding][].
1916-
* `settings` {HTTP2 Settings Object} The initial settings to send to the
1916+
* `settings` {HTTP/2 Settings Object} The initial settings to send to the
19171917
remote peer upon connection.
19181918
* `createConnection` {Function} An optional callback that receives the `URL`
19191919
instance passed to `connect` and the `options` object, and returns any
@@ -1966,7 +1966,7 @@ a given number of milliseconds set using `http2server.setTimeout()`.
19661966
added: v8.4.0
19671967
-->
19681968

1969-
* Returns: {HTTP2 Settings Object}
1969+
* Returns: {HTTP/2 Settings Object}
19701970

19711971
Returns an object containing the default settings for an `Http2Session`
19721972
instance. This method returns a new object instance every time it is called
@@ -1977,7 +1977,7 @@ so instances returned may be safely modified for use.
19771977
added: v8.4.0
19781978
-->
19791979

1980-
* `settings` {HTTP2 Settings Object}
1980+
* `settings` {HTTP/2 Settings Object}
19811981
* Returns: {Buffer}
19821982

19831983
Returns a `Buffer` instance containing serialized representation of the given
@@ -1999,9 +1999,9 @@ added: v8.4.0
19991999
-->
20002000

20012001
* `buf` {Buffer|Uint8Array} The packed settings.
2002-
* Returns: {HTTP2 Settings Object}
2002+
* Returns: {HTTP/2 Settings Object}
20032003

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

20072007
### Headers Object
@@ -2262,7 +2262,7 @@ In order to create a mixed [HTTPS][] and HTTP/2 server, refer to the
22622262
[ALPN negotiation][] section.
22632263
Upgrading from non-tls HTTP/1 servers is not supported.
22642264

2265-
The HTTP2 compatibility API is composed of [`Http2ServerRequest`]() and
2265+
The HTTP/2 compatibility API is composed of [`Http2ServerRequest`]() and
22662266
[`Http2ServerResponse`](). They aim at API compatibility with HTTP/1, but
22672267
they do not hide the differences between the protocols. As an example,
22682268
the status message for HTTP codes is ignored.
@@ -2370,7 +2370,7 @@ Example:
23702370
console.log(request.headers);
23712371
```
23722372

2373-
See [HTTP2 Headers Object][].
2373+
See [HTTP/2 Headers Object][].
23742374

23752375
In HTTP/2, the request path, hostname, protocol, and method are represented as
23762376
special headers prefixed with the `:` character (e.g. `':path'`). These special
@@ -3097,8 +3097,8 @@ following additional properties:
30973097
[HTTP/1]: http.html
30983098
[HTTP/2]: https://tools.ietf.org/html/rfc7540
30993099
[HTTP/2 Unencrypted]: https://http2.github.io/faq/#does-http2-require-encryption
3100-
[HTTP2 Headers Object]: #http2_headers_object
3101-
[HTTP2 Settings Object]: #http2_settings_object
3100+
[HTTP/2 Headers Object]: #http2_headers_object
3101+
[HTTP/2 Settings Object]: #http2_settings_object
31023102
[HTTPS]: https.html
31033103
[Http2Session and Sockets]: #http2_http2session_and_sockets
31043104
[Performance Observer]: perf_hooks.html

tools/doc/type-parser.js

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

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

0 commit comments

Comments
 (0)