Skip to content
Permalink
Browse files

doc: remove "note that" from http2.md

Refs: nodejs/remark-preset-lint-node#16

PR-URL: #28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information...
Trott authored and targos committed Jun 20, 2019
1 parent f4c6f7a commit f0a857f4b873007164bf070e18cd3b55f8e52c3c
Showing with 14 additions and 14 deletions.
  1. +14 −14 doc/api/http2.md
@@ -988,7 +988,7 @@ The `'trailers'` event is emitted when a block of headers associated with
trailing header fields is received. The listener callback is passed the
[HTTP/2 Headers Object][] and flags associated with the headers.

Note that this event might not be emitted if `http2stream.end()` is called
This event might not be emitted if `http2stream.end()` is called
before trailers are received and the incoming data is not being read or
listened for.

@@ -1488,7 +1488,7 @@ requests.

The file descriptor is not closed when the stream is closed, so it will need
to be closed manually once it is no longer needed.
Note that using the same file descriptor concurrently for multiple streams
Using the same file descriptor concurrently for multiple streams
is not supported and may result in data loss. Re-using a file descriptor
after a stream has finished is supported.

@@ -1669,7 +1669,7 @@ client should continue to send the request body, or generating an appropriate
HTTP response (e.g. 400 Bad Request) if the client should not continue to send
the request body.

Note that when this event is emitted and handled, the [`'request'`][] event will
When this event is emitted and handled, the [`'request'`][] event will
not be emitted.

#### Event: 'request'
@@ -1680,7 +1680,7 @@ added: v8.4.0
* `request` {http2.Http2ServerRequest}
* `response` {http2.Http2ServerResponse}

Emitted each time there is a request. Note that there may be multiple requests
Emitted each time there is a request. There may be multiple requests
per session. See the [Compatibility API][].

#### Event: 'session'
@@ -1750,7 +1750,7 @@ added: v8.4.0

Stops the server from accepting new connections. See [`net.Server.close()`][].

Note that this is not analogous to restricting new requests since HTTP/2
This is not analogous to restricting new requests since HTTP/2
connections are persistent. To achieve a similar graceful shutdown behavior,
consider also using [`http2session.close()`] on active sessions.

@@ -1805,7 +1805,7 @@ client should continue to send the request body, or generating an appropriate
HTTP response (e.g. 400 Bad Request) if the client should not continue to send
the request body.

Note that when this event is emitted and handled, the [`'request'`][] event will
When this event is emitted and handled, the [`'request'`][] event will
not be emitted.

#### Event: 'request'
@@ -1816,7 +1816,7 @@ added: v8.4.0
* `request` {http2.Http2ServerRequest}
* `response` {http2.Http2ServerResponse}

Emitted each time there is a request. Note that there may be multiple requests
Emitted each time there is a request. There may be multiple requests
per session. See the [Compatibility API][].

#### Event: 'session'
@@ -1895,7 +1895,7 @@ added: v8.4.0

Stops the server from accepting new connections. See [`tls.Server.close()`][].

Note that this is not analogous to restricting new requests since HTTP/2
This is not analogous to restricting new requests since HTTP/2
connections are persistent. To achieve a similar graceful shutdown behavior,
consider also using [`http2session.close()`] on active sessions.

@@ -2771,7 +2771,7 @@ added: v8.4.0

The raw request/response headers list exactly as they were received.

Note that the keys and values are in the same list. It is *not* a
The keys and values are in the same list. It is *not* a
list of tuples. So, the even-numbered offsets are key values, and the
odd-numbered offsets are the associated values.

@@ -3035,7 +3035,7 @@ added: v8.4.0
* Returns: {string}

Reads out a header that has already been queued but not sent to the client.
Note that the name is case insensitive.
The name is case-insensitive.

```js
const contentType = response.getHeader('content-type');
@@ -3094,7 +3094,7 @@ added: v8.4.0
* Returns: {boolean}

Returns `true` if the header identified by `name` is currently set in the
outgoing headers. Note that the header name matching is case-insensitive.
outgoing headers. The header name matching is case-insensitive.

```js
const hasContentType = response.hasHeader('content-type');
@@ -3278,7 +3278,7 @@ it will switch to implicit header mode and flush the implicit headers.
This sends a chunk of the response body. This method may
be called multiple times to provide successive parts of the body.

Note that in the `http` module, the response body is omitted when the
In the `http` module, the response body is omitted when the
request is a HEAD request. Similarly, the `204` and `304` responses
_must not_ include a message body.

@@ -3341,12 +3341,12 @@ response.writeHead(200, {
'Content-Type': 'text/plain' });
```

Note that Content-Length is given in bytes not characters. The
`Content-Length` is given in bytes not characters. The
`Buffer.byteLength()` API may be used to determine the number of bytes in a
given encoding. On outbound messages, Node.js does not check if Content-Length
and the length of the body being transmitted are equal or not. However, when
receiving messages, Node.js will automatically reject messages when the
Content-Length does not match the actual payload size.
`Content-Length` does not match the actual payload size.

This method may be called at most one time on a message before
[`response.end()`][] is called.

0 comments on commit f0a857f

Please sign in to comment.
You can’t perform that action at this time.