Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4228141

Browse filesBrowse files
FlarnaBethGriggs
authored andcommitted
doc: Improve doc for Http2 headers object
Add more details regarding processing and data type of incoming headers in Http2. Backport-PR-URL: #22850 PR-URL: #21296 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
1 parent 20b72fc commit 4228141
Copy full SHA for 4228141

File tree

Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/http2.md‎

Copy file name to clipboardExpand all lines: doc/api/http2.md
+17Lines changed: 17 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,23 @@ prototype. This means that normal JavaScript object methods such as
21202120
`Object.prototype.toString()` and `Object.prototype.hasOwnProperty()` will
21212121
not work.
21222122

2123+
For incoming headers:
2124+
* The `:status` header is converted to `number`.
2125+
* Duplicates of `:status`, `:method`, `:authority`, `:scheme`, `:path`,
2126+
`age`, `authorization`, `access-control-allow-credentials`,
2127+
`access-control-max-age`, `access-control-request-method`, `content-encoding`,
2128+
`content-language`, `content-length`, `content-location`, `content-md5`,
2129+
`content-range`, `content-type`, `date`, `dnt`, `etag`, `expires`, `from`,
2130+
`if-match`, `if-modified-since`, `if-none-match`, `if-range`,
2131+
`if-unmodified-since`, `last-modified`, `location`, `max-forwards`,
2132+
`proxy-authorization`, `range`, `referer`,`retry-after`, `tk`,
2133+
`upgrade-insecure-requests`, `user-agent` or `x-content-type-options` are
2134+
discarded.
2135+
* `set-cookie` is a string if present once or an array in case duplicates
2136+
are present.
2137+
* `cookie`: the values are joined together with '; '.
2138+
* For all other headers, the values are joined together with ', '.
2139+
21232140
```js
21242141
const http2 = require('http2');
21252142
const server = http2.createServer();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.