diff --git a/doc/api/http2.md b/doc/api/http2.md index 364c1650ee501e..d7bbbc1d132ceb 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2127,6 +2127,18 @@ console.log(request.headers); See [Headers Object][]. +*Note*: In HTTP/2, the request path, host name, protocol, and method are +represented as special headers prefixed with the `:` character (e.g. `':path'`). +These special headers will be included in the `request.headers` object. Care +must be taken not to inadvertently modify these special headers or errors may +occur. For instance, removing all headers from the request will cause errors +to occur: + +```js +removeAllHeaders(request.headers); +assert(request.url); // Fails because the :path header has been removed +``` + #### request.httpVersion