GeezerVison is showing github.com — doc: Improve doc for Http2 headers object · nodejs/node@4647f61
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file 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 number | Diff line number | Diff line change |
|---|
@@ -2118,6 +2118,23 @@ means that normal JavaScript object methods such as | 2118 | 2118 | `Object.prototype.toString()` and `Object.prototype.hasOwnProperty()` will | 2119 | 2119 | not work. | 2120 | 2120 |
| | 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 | + | 2121 | 2138 | ```js | 2122 | 2139 | const http2 = require('http2'); | 2123 | 2140 | const server = http2.createServer(); | |
|