Skip to content

Commit

Permalink
doc: caution against removing pseudoheaders
Browse files Browse the repository at this point in the history
PR-URL: #17329
Fixes: #15312
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
  • Loading branch information
jasnell authored and MylesBorins committed Dec 12, 2017
1 parent 63f6947 commit a0acd91
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<!-- YAML
added: v8.4.0
Expand Down

0 comments on commit a0acd91

Please sign in to comment.