@@ -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
@@ -647,7 +647,7 @@ may be passed to clear any previously set alternative service for a given
647
647
domain.
648
648
649
649
When a string is passed for the ` originOrStream ` argument, it will be parsed as
650
- a URL and the origin will be derived. For insetance , the origin for the
650
+ a URL and the origin will be derived. For instance , the origin for the
651
651
HTTP URL ` 'https://example.org/foo/bar' ` is the ASCII string
652
652
` 'https://example.org' ` . An error will be thrown if either the given string
653
653
cannot be parsed as a URL or if a valid origin cannot be derived.
@@ -751,15 +751,15 @@ req.on('response', (headers) => {
751
751
752
752
When set, the ` options.getTrailers() ` function is called immediately after
753
753
queuing the last chunk of payload data to be sent. The callback is passed a
754
- single object (with a ` null ` prototype) that the listener may used to specify
754
+ single object (with a ` null ` prototype) that the listener may use to specify
755
755
the trailing header fields to send to the peer.
756
756
757
757
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
758
- " pseudo-header" fields (e.g. ` ':method' ` , ` ':path' ` , etc). An ` 'error' ` event
758
+ pseudo-header fields (e.g. ` ':method' ` , ` ':path' ` , etc). An ` 'error' ` event
759
759
will be emitted if the ` getTrailers ` callback attempts to set such header
760
760
fields.
761
761
762
- The ` :method ` and ` :path ` pseudoheaders are not specified within ` headers ` ,
762
+ The ` :method ` and ` :path ` pseudo-headers are not specified within ` headers ` ,
763
763
they respectively default to:
764
764
765
765
* ` :method ` = ` 'GET' `
@@ -786,7 +786,7 @@ On the client, `Http2Stream` instances are created and returned when either the
786
786
` 'push' ` event.
787
787
788
788
* Note* : The ` Http2Stream ` class is a base for the [ ` ServerHttp2Stream ` ] [ ] and
789
- [ ` ClientHttp2Stream ` ] [ ] classes, each of which are used specifically by either
789
+ [ ` ClientHttp2Stream ` ] [ ] classes, each of which is used specifically by either
790
790
the Server or Client side, respectively.
791
791
792
792
All ` Http2Stream ` instances are [ ` Duplex ` ] [ ] streams. The ` Writable ` side of the
@@ -810,7 +810,7 @@ On the client side, instances of [`ClientHttp2Stream`][] are created when the
810
810
` http2session.request() ` may not be immediately ready for use if the parent
811
811
` Http2Session ` has not yet been fully established. In such cases, operations
812
812
called on the ` Http2Stream ` will be buffered until the ` 'ready' ` event is
813
- emitted. User code should rarely, if ever, have need to handle the ` 'ready' `
813
+ emitted. User code should rarely, if ever, need to handle the ` 'ready' `
814
814
event directly. The ready status of an ` Http2Stream ` can be determined by
815
815
checking the value of ` http2stream.id ` . If the value is ` undefined ` , the stream
816
816
is not yet ready for use.
@@ -1067,7 +1067,7 @@ added: v8.4.0
1067
1067
-->
1068
1068
1069
1069
The ` 'headers' ` event is emitted when an additional block of headers is received
1070
- for a stream, such as when a block of ` 1xx ` informational headers are received.
1070
+ for a stream, such as when a block of ` 1xx ` informational headers is received.
1071
1071
The listener callback is passed the [ Headers Object] [ ] and flags associated with
1072
1072
the headers.
1073
1073
@@ -1217,7 +1217,7 @@ server.on('stream', (stream) => {
1217
1217
1218
1218
When set, the ` options.getTrailers() ` function is called immediately after
1219
1219
queuing the last chunk of payload data to be sent. The callback is passed a
1220
- single object (with a ` null ` prototype) that the listener may used to specify
1220
+ single object (with a ` null ` prototype) that the listener may use to specify
1221
1221
the trailing header fields to send to the peer.
1222
1222
1223
1223
``` js
@@ -1234,7 +1234,7 @@ server.on('stream', (stream) => {
1234
1234
```
1235
1235
1236
1236
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
1237
- " pseudo-header" fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1237
+ pseudo-header fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1238
1238
will be emitted if the ` getTrailers ` callback attempts to set such header
1239
1239
fields.
1240
1240
@@ -1291,7 +1291,7 @@ requests.
1291
1291
1292
1292
When set, the ` options.getTrailers() ` function is called immediately after
1293
1293
queuing the last chunk of payload data to be sent. The callback is passed a
1294
- single object (with a ` null ` prototype) that the listener may used to specify
1294
+ single object (with a ` null ` prototype) that the listener may use to specify
1295
1295
the trailing header fields to send to the peer.
1296
1296
1297
1297
``` js
@@ -1318,7 +1318,7 @@ server.on('close', () => fs.closeSync(fd));
1318
1318
```
1319
1319
1320
1320
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
1321
- " pseudo-header" fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1321
+ pseudo-header fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1322
1322
will be emitted if the ` getTrailers ` callback attempts to set such header
1323
1323
fields.
1324
1324
@@ -1350,7 +1350,7 @@ of the given file:
1350
1350
1351
1351
If an error occurs while attempting to read the file data, the ` Http2Stream `
1352
1352
will be closed using an ` RST_STREAM ` frame using the standard ` INTERNAL_ERROR `
1353
- code. If the ` onError ` callback is defined it will be called, otherwise
1353
+ code. If the ` onError ` callback is defined, then it will be called. Otherwise
1354
1354
the stream will be destroyed.
1355
1355
1356
1356
Example using a file path:
@@ -1410,7 +1410,7 @@ default behavior is to destroy the stream.
1410
1410
1411
1411
When set, the ` options.getTrailers() ` function is called immediately after
1412
1412
queuing the last chunk of payload data to be sent. The callback is passed a
1413
- single object (with a ` null ` prototype) that the listener may used to specify
1413
+ single object (with a ` null ` prototype) that the listener may use to specify
1414
1414
the trailing header fields to send to the peer.
1415
1415
1416
1416
``` js
@@ -1427,7 +1427,7 @@ server.on('stream', (stream) => {
1427
1427
```
1428
1428
1429
1429
* Note* : The HTTP/1 specification forbids trailers from containing HTTP/2
1430
- " pseudo-header" fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1430
+ pseudo-header fields (e.g. ` ':status' ` , ` ':path' ` , etc). An ` 'error' ` event
1431
1431
will be emitted if the ` getTrailers ` callback attempts to set such header
1432
1432
fields.
1433
1433
@@ -1497,7 +1497,7 @@ an `Http2Session` object associated with the `Http2Server`.
1497
1497
added: v8.5.0
1498
1498
-->
1499
1499
1500
- If an ` ServerHttp2Stream ` emits an ` 'error' ` event, it will be forwarded here.
1500
+ If a ` ServerHttp2Stream ` emits an ` 'error' ` event, it will be forwarded here.
1501
1501
The stream will already be destroyed when this event is triggered.
1502
1502
1503
1503
#### Event: 'stream'
@@ -1683,7 +1683,7 @@ changes:
1683
1683
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
1684
1684
enough padding to ensure that the total frame length, including the
1685
1685
9-byte header, is a multiple of 8. For each frame, however, there is a
1686
- maxmimum allowed number of padding bytes that is determined by current
1686
+ maximum allowed number of padding bytes that is determined by current
1687
1687
flow control state and settings. If this maximum is less than the
1688
1688
calculated amount needed to ensure alignment, the maximum will be used
1689
1689
and the total frame length will * not* necessarily be aligned at 8 bytes.
@@ -1770,7 +1770,7 @@ changes:
1770
1770
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
1771
1771
enough padding to ensure that the total frame length, including the
1772
1772
9-byte header, is a multiple of 8. For each frame, however, there is a
1773
- maxmimum allowed number of padding bytes that is determined by current
1773
+ maximum allowed number of padding bytes that is determined by current
1774
1774
flow control state and settings. If this maximum is less than the
1775
1775
calculated amount needed to ensure alignment, the maximum will be used
1776
1776
and the total frame length will * not* necessarily be aligned at 8 bytes.
@@ -1866,7 +1866,7 @@ changes:
1866
1866
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
1867
1867
enough padding to ensure that the total frame length, including the
1868
1868
9-byte header, is a multiple of 8. For each frame, however, there is a
1869
- maxmimum allowed number of padding bytes that is determined by current
1869
+ maximum allowed number of padding bytes that is determined by current
1870
1870
flow control state and settings. If this maximum is less than the
1871
1871
calculated amount needed to ensure alignment, the maximum will be used
1872
1872
and the total frame length will * not* necessarily be aligned at 8 bytes.
@@ -2208,8 +2208,8 @@ req.end('Jane');
2208
2208
2209
2209
The Compatibility API has the goal of providing a similar developer experience
2210
2210
of HTTP/1 when using HTTP/2, making it possible to develop applications
2211
- that supports both [ HTTP/1] [ ] and HTTP/2. This API targets only the
2212
- ** public API** of the [ HTTP/1] [ ] , however many modules uses internal
2211
+ that support both [ HTTP/1] [ ] and HTTP/2. This API targets only the
2212
+ ** public API** of the [ HTTP/1] [ ] . However many modules use internal
2213
2213
methods or state, and those _ are not supported_ as it is a completely
2214
2214
different implementation.
2215
2215
@@ -2237,7 +2237,7 @@ the status message for HTTP codes is ignored.
2237
2237
2238
2238
### ALPN negotiation
2239
2239
2240
- ALPN negotiation allows to support both [ HTTPS] [ ] and HTTP/2 over
2240
+ ALPN negotiation allows supporting both [ HTTPS] [ ] and HTTP/2 over
2241
2241
the same socket. The ` req ` and ` res ` objects can be either HTTP/1 or
2242
2242
HTTP/2, and an application ** must** restrict itself to the public API of
2243
2243
[ HTTP/1] [ ] , and detect if it is possible to use the more advanced
@@ -2279,7 +2279,7 @@ added: v8.4.0
2279
2279
2280
2280
A ` Http2ServerRequest ` object is created by [ ` http2.Server ` ] [ ] or
2281
2281
[ ` http2.SecureServer ` ] [ ] and passed as the first argument to the
2282
- [ ` 'request' ` ] [ ] event. It may be used to access a request status, headers and
2282
+ [ ` 'request' ` ] [ ] event. It may be used to access a request status, headers, and
2283
2283
data.
2284
2284
2285
2285
It implements the [ Readable Stream] [ ] interface, as well as the
@@ -2340,7 +2340,7 @@ console.log(request.headers);
2340
2340
2341
2341
See [ Headers Object] [ ] .
2342
2342
2343
- * Note* : In HTTP/2, the request path, host name , protocol, and method are
2343
+ * Note* : In HTTP/2, the request path, hostname , protocol, and method are
2344
2344
represented as special headers prefixed with the ` : ` character (e.g. ` ':path' ` ).
2345
2345
These special headers will be included in the ` request.headers ` object. Care
2346
2346
must be taken not to inadvertently modify these special headers or errors may
@@ -2373,7 +2373,7 @@ added: v8.4.0
2373
2373
2374
2374
* {string}
2375
2375
2376
- The request method as a string. Read only. Example:
2376
+ The request method as a string. Read- only. Example:
2377
2377
` 'GET' ` , ` 'DELETE' ` .
2378
2378
2379
2379
#### request.rawHeaders
@@ -3031,7 +3031,7 @@ If `name` is equal to `Http2Session`, the `PerformanceEntry` will contain the
3031
3031
following additional properties:
3032
3032
3033
3033
* ` pingRTT ` {number} The number of milliseconds elapsed since the transmission
3034
- of a ` PING ` frame and the reception of its acknowledgement . Only present if
3034
+ of a ` PING ` frame and the reception of its acknowledgment . Only present if
3035
3035
a ` PING ` frame has been sent on the ` Http2Session ` .
3036
3036
* ` streamCount ` {number} The number of ` Http2Stream ` instances processed by
3037
3037
the ` Http2Session ` .
0 commit comments