@@ -166,7 +166,7 @@ When invoked, the handler function will receive three arguments:
166
166
167
167
If the ` 'frameError' ` event is associated with a stream, the stream will be
168
168
closed and destroyed immediately following the ` 'frameError' ` event. If the
169
- event is not associated with a stream, the ` Http2Session ` will be shutdown
169
+ event is not associated with a stream, the ` Http2Session ` will be shut down
170
170
immediately following the ` 'frameError' ` event.
171
171
172
172
#### Event: 'goaway'
@@ -183,7 +183,7 @@ the handler function will receive three arguments:
183
183
* ` opaqueData ` {Buffer} If additional opaque data was included in the GOAWAY
184
184
frame, a ` Buffer ` instance will be passed containing that data.
185
185
186
- * Note* : The ` Http2Session ` instance will be shutdown automatically when the
186
+ * Note* : The ` Http2Session ` instance will be shut down automatically when the
187
187
` 'goaway' ` event is emitted.
188
188
189
189
#### Event: 'localSettings'
@@ -499,7 +499,7 @@ added: v8.4.0
499
499
has been completed.
500
500
* Returns: {undefined}
501
501
502
- Attempts to shutdown this ` Http2Session ` using HTTP/2 defined procedures.
502
+ Attempts to shut down this ` Http2Session ` using HTTP/2 defined procedures.
503
503
If specified, the given ` callback ` function will be invoked once the shutdown
504
504
process has completed.
505
505
@@ -635,7 +635,7 @@ may be passed to clear any previously set alternative service for a given
635
635
domain.
636
636
637
637
When a string is passed for the ` originOrStream ` argument, it will be parsed as
638
- a URL and the origin will be derived. For insetance , the origin for the
638
+ a URL and the origin will be derived. For instance , the origin for the
639
639
HTTP URL ` 'https://example.org/foo/bar' ` is the ASCII string
640
640
` 'https://example.org' ` . An error will be thrown if either the given string
641
641
cannot be parsed as a URL or if a valid origin cannot be derived.
@@ -739,15 +739,15 @@ req.on('response', (headers) => {
739
739
740
740
When set, the ` options.getTrailers() ` function is called immediately after
741
741
queuing the last chunk of payload data to be sent. The callback is passed a
742
- single object (with a ` null ` prototype) that the listener may used to specify
742
+ single object (with a ` null ` prototype) that the listener may use to specify
743
743
the trailing header fields to send to the peer.
744
744
745
745
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
746
- " pseudo-header" fields (e.g. ` ':method' ` , ` ':path' ` , etc). An ` 'error' ` event
746
+ pseudo-header fields (e.g. ` ':method' ` , ` ':path' ` , etc). An ` 'error' ` event
747
747
will be emitted if the ` getTrailers ` callback attempts to set such header
748
748
fields.
749
749
750
- The ` :method ` and ` :path ` pseudoheaders are not specified within ` headers ` ,
750
+ The ` :method ` and ` :path ` pseudo-headers are not specified within ` headers ` ,
751
751
they respectively default to:
752
752
753
753
* ` :method ` = ` 'GET' `
@@ -774,7 +774,7 @@ On the client, `Http2Stream` instances are created and returned when either the
774
774
` 'push' ` event.
775
775
776
776
* Note* : The ` Http2Stream ` class is a base for the [ ` ServerHttp2Stream ` ] [ ] and
777
- [ ` ClientHttp2Stream ` ] [ ] classes, each of which are used specifically by either
777
+ [ ` ClientHttp2Stream ` ] [ ] classes, each of which is used specifically by either
778
778
the Server or Client side, respectively.
779
779
780
780
All ` Http2Stream ` instances are [ ` Duplex ` ] [ ] streams. The ` Writable ` side of the
@@ -798,7 +798,7 @@ On the client side, instances of [`ClientHttp2Stream`][] are created when the
798
798
` http2session.request() ` may not be immediately ready for use if the parent
799
799
` Http2Session ` has not yet been fully established. In such cases, operations
800
800
called on the ` Http2Stream ` will be buffered until the ` 'ready' ` event is
801
- emitted. User code should rarely, if ever, have need to handle the ` 'ready' `
801
+ emitted. User code should rarely, if ever, need to handle the ` 'ready' `
802
802
event directly. The ready status of an ` Http2Stream ` can be determined by
803
803
checking the value of ` http2stream.id ` . If the value is ` undefined ` , the stream
804
804
is not yet ready for use.
@@ -1048,7 +1048,7 @@ added: v8.4.0
1048
1048
-->
1049
1049
1050
1050
The ` 'headers' ` event is emitted when an additional block of headers is received
1051
- for a stream, such as when a block of ` 1xx ` informational headers are received.
1051
+ for a stream, such as when a block of ` 1xx ` informational headers is received.
1052
1052
The listener callback is passed the [ Headers Object] [ ] and flags associated with
1053
1053
the headers.
1054
1054
@@ -1198,7 +1198,7 @@ server.on('stream', (stream) => {
1198
1198
1199
1199
When set, the ` options.getTrailers() ` function is called immediately after
1200
1200
queuing the last chunk of payload data to be sent. The callback is passed a
1201
- single object (with a ` null ` prototype) that the listener may used to specify
1201
+ single object (with a ` null ` prototype) that the listener may use to specify
1202
1202
the trailing header fields to send to the peer.
1203
1203
1204
1204
``` js
@@ -1215,7 +1215,7 @@ server.on('stream', (stream) => {
1215
1215
```
1216
1216
1217
1217
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
1218
- " pseudo-header" fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1218
+ pseudo-header fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1219
1219
will be emitted if the ` getTrailers ` callback attempts to set such header
1220
1220
fields.
1221
1221
@@ -1272,7 +1272,7 @@ requests.
1272
1272
1273
1273
When set, the ` options.getTrailers() ` function is called immediately after
1274
1274
queuing the last chunk of payload data to be sent. The callback is passed a
1275
- single object (with a ` null ` prototype) that the listener may used to specify
1275
+ single object (with a ` null ` prototype) that the listener may use to specify
1276
1276
the trailing header fields to send to the peer.
1277
1277
1278
1278
``` js
@@ -1299,7 +1299,7 @@ server.on('close', () => fs.closeSync(fd));
1299
1299
```
1300
1300
1301
1301
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
1302
- " pseudo-header" fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1302
+ pseudo-header fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1303
1303
will be emitted if the ` getTrailers ` callback attempts to set such header
1304
1304
fields.
1305
1305
@@ -1331,7 +1331,7 @@ of the given file:
1331
1331
1332
1332
If an error occurs while attempting to read the file data, the ` Http2Stream `
1333
1333
will be closed using an ` RST_STREAM ` frame using the standard ` INTERNAL_ERROR `
1334
- code. If the ` onError ` callback is defined it will be called, otherwise
1334
+ code. If the ` onError ` callback is defined, then it will be called. Otherwise
1335
1335
the stream will be destroyed.
1336
1336
1337
1337
Example using a file path:
@@ -1391,7 +1391,7 @@ default behavior is to destroy the stream.
1391
1391
1392
1392
When set, the ` options.getTrailers() ` function is called immediately after
1393
1393
queuing the last chunk of payload data to be sent. The callback is passed a
1394
- single object (with a ` null ` prototype) that the listener may used to specify
1394
+ single object (with a ` null ` prototype) that the listener may use to specify
1395
1395
the trailing header fields to send to the peer.
1396
1396
1397
1397
``` js
@@ -1408,7 +1408,7 @@ server.on('stream', (stream) => {
1408
1408
```
1409
1409
1410
1410
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
1411
- " pseudo-header" fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1411
+ pseudo-header fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1412
1412
will be emitted if the ` getTrailers ` callback attempts to set such header
1413
1413
fields.
1414
1414
@@ -1478,7 +1478,7 @@ an `Http2Session` object associated with the `Http2Server`.
1478
1478
added: v8.5.0
1479
1479
-->
1480
1480
1481
- If an ` ServerHttp2Stream ` emits an ` 'error' ` event, it will be forwarded here.
1481
+ If a ` ServerHttp2Stream ` emits an ` 'error' ` event, it will be forwarded here.
1482
1482
The stream will already be destroyed when this event is triggered.
1483
1483
1484
1484
#### Event: 'stream'
@@ -1664,7 +1664,7 @@ changes:
1664
1664
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
1665
1665
enough padding to ensure that the total frame length, including the
1666
1666
9-byte header, is a multiple of 8. For each frame, however, there is a
1667
- maxmimum allowed number of padding bytes that is determined by current
1667
+ maximum allowed number of padding bytes that is determined by current
1668
1668
flow control state and settings. If this maximum is less than the
1669
1669
calculated amount needed to ensure alignment, the maximum will be used
1670
1670
and the total frame length will * not* necessarily be aligned at 8 bytes.
@@ -1751,7 +1751,7 @@ changes:
1751
1751
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
1752
1752
enough padding to ensure that the total frame length, including the
1753
1753
9-byte header, is a multiple of 8. For each frame, however, there is a
1754
- maxmimum allowed number of padding bytes that is determined by current
1754
+ maximum allowed number of padding bytes that is determined by current
1755
1755
flow control state and settings. If this maximum is less than the
1756
1756
calculated amount needed to ensure alignment, the maximum will be used
1757
1757
and the total frame length will * not* necessarily be aligned at 8 bytes.
@@ -1847,7 +1847,7 @@ changes:
1847
1847
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
1848
1848
enough padding to ensure that the total frame length, including the
1849
1849
9-byte header, is a multiple of 8. For each frame, however, there is a
1850
- maxmimum allowed number of padding bytes that is determined by current
1850
+ maximum allowed number of padding bytes that is determined by current
1851
1851
flow control state and settings. If this maximum is less than the
1852
1852
calculated amount needed to ensure alignment, the maximum will be used
1853
1853
and the total frame length will * not* necessarily be aligned at 8 bytes.
@@ -2189,8 +2189,8 @@ req.end('Jane');
2189
2189
2190
2190
The Compatibility API has the goal of providing a similar developer experience
2191
2191
of HTTP/1 when using HTTP/2, making it possible to develop applications
2192
- that supports both [ HTTP/1] [ ] and HTTP/2. This API targets only the
2193
- ** public API** of the [ HTTP/1] [ ] , however many modules uses internal
2192
+ that support both [ HTTP/1] [ ] and HTTP/2. This API targets only the
2193
+ ** public API** of the [ HTTP/1] [ ] . However many modules use internal
2194
2194
methods or state, and those _ are not supported_ as it is a completely
2195
2195
different implementation.
2196
2196
@@ -2218,7 +2218,7 @@ the status message for HTTP codes is ignored.
2218
2218
2219
2219
### ALPN negotiation
2220
2220
2221
- ALPN negotiation allows to support both [ HTTPS] [ ] and HTTP/2 over
2221
+ ALPN negotiation allows supporting both [ HTTPS] [ ] and HTTP/2 over
2222
2222
the same socket. The ` req ` and ` res ` objects can be either HTTP/1 or
2223
2223
HTTP/2, and an application ** must** restrict itself to the public API of
2224
2224
[ HTTP/1] [ ] , and detect if it is possible to use the more advanced
@@ -2260,7 +2260,7 @@ added: v8.4.0
2260
2260
2261
2261
A ` Http2ServerRequest ` object is created by [ ` http2.Server ` ] [ ] or
2262
2262
[ ` http2.SecureServer ` ] [ ] and passed as the first argument to the
2263
- [ ` 'request' ` ] [ ] event. It may be used to access a request status, headers and
2263
+ [ ` 'request' ` ] [ ] event. It may be used to access a request status, headers, and
2264
2264
data.
2265
2265
2266
2266
It implements the [ Readable Stream] [ ] interface, as well as the
@@ -2321,7 +2321,7 @@ console.log(request.headers);
2321
2321
2322
2322
See [ Headers Object] [ ] .
2323
2323
2324
- * Note* : In HTTP/2, the request path, host name , protocol, and method are
2324
+ * Note* : In HTTP/2, the request path, hostname , protocol, and method are
2325
2325
represented as special headers prefixed with the ` : ` character (e.g. ` ':path' ` ).
2326
2326
These special headers will be included in the ` request.headers ` object. Care
2327
2327
must be taken not to inadvertently modify these special headers or errors may
@@ -2354,7 +2354,7 @@ added: v8.4.0
2354
2354
2355
2355
* {string}
2356
2356
2357
- The request method as a string. Read only. Example:
2357
+ The request method as a string. Read- only. Example:
2358
2358
` 'GET' ` , ` 'DELETE' ` .
2359
2359
2360
2360
#### request.rawHeaders
@@ -3012,7 +3012,7 @@ If `name` is equal to `Http2Session`, the `PerformanceEntry` will contain the
3012
3012
following additional properties:
3013
3013
3014
3014
* ` pingRTT ` {number} The number of milliseconds elapsed since the transmission
3015
- of a ` PING ` frame and the reception of its acknowledgement . Only present if
3015
+ of a ` PING ` frame and the reception of its acknowledgment . Only present if
3016
3016
a ` PING ` frame has been sent on the ` Http2Session ` .
3017
3017
* ` streamCount ` {number} The number of ` Http2Stream ` instances processed by
3018
3018
the ` Http2Session ` .
0 commit comments