summaryrefslogtreecommitdiff
path: root/doc/api/http2.md
diff options
context:
space:
mode:
authorGerhard Stoebich <deb2001-github@yahoo.de>2018-06-13 00:26:42 +0200
committerAnatoli Papirovski <apapirovski@mac.com>2018-06-24 23:57:20 -0700
commit813241316628679a502e6955375838bd506791e8 (patch)
treeb5622311ad419e0ff38d88cbe34e579c9414efa8 /doc/api/http2.md
parent831821bcf50e722072b0aeac93aacd2c09caae57 (diff)
downloadandroid-node-v8-813241316628679a502e6955375838bd506791e8.tar.gz
android-node-v8-813241316628679a502e6955375838bd506791e8.tar.bz2
android-node-v8-813241316628679a502e6955375838bd506791e8.zip
doc: Improve doc for Http2 headers object
Add more details regarding processing and data type of incoming headers in Http2. PR-URL: https://github.com/nodejs/node/pull/21296 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'doc/api/http2.md')
-rw-r--r--doc/api/http2.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md
index 72233407d6..b320e1d632 100644
--- a/doc/api/http2.md
+++ b/doc/api/http2.md
@@ -2118,6 +2118,23 @@ means that normal JavaScript object methods such as
`Object.prototype.toString()` and `Object.prototype.hasOwnProperty()` will
not work.
+For incoming headers:
+* The `:status` header is converted to `number`.
+* Duplicates of `:status`, `:method`, `:authority`, `:scheme`, `:path`,
+`age`, `authorization`, `access-control-allow-credentials`,
+`access-control-max-age`, `access-control-request-method`, `content-encoding`,
+`content-language`, `content-length`, `content-location`, `content-md5`,
+`content-range`, `content-type`, `date`, `dnt`, `etag`, `expires`, `from`,
+`if-match`, `if-modified-since`, `if-none-match`, `if-range`,
+`if-unmodified-since`, `last-modified`, `location`, `max-forwards`,
+`proxy-authorization`, `range`, `referer`,`retry-after`, `tk`,
+`upgrade-insecure-requests`, `user-agent` or `x-content-type-options` are
+discarded.
+* `set-cookie` is a string if present once or an array in case duplicates
+are present.
+* `cookie`: the values are joined together with '; '.
+* For all other headers, the values are joined together with ', '.
+
```js
const http2 = require('http2');
const server = http2.createServer();