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 4647f61

Browse filesBrowse files
Flarnatargos
authored andcommitted
doc: Improve doc for Http2 headers object
Add more details regarding processing and data type of incoming headers in Http2. 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 fe6d707 commit 4647f61
Copy full SHA for 4647f61

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
@@ -2118,6 +2118,23 @@ means that normal JavaScript object methods such as
21182118
`Object.prototype.toString()` and `Object.prototype.hasOwnProperty()` will
21192119
not work.
21202120

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