From 972c2dfbf8ec50072ba26094b08c2a00732ce8c0 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich Date: Wed, 13 Jun 2018 00:26:42 +0200 Subject: [PATCH 1/3] doc: Improve doc for Http2 headers object Add more details regarding processing and data type of incoming headers in Http2. --- doc/api/http2.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/api/http2.md b/doc/api/http2.md index 72233407d6c9e2..17800162ac81bf 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. +There is following processing done in 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(); From 6129c5b5c333e60abdc4e63602eb35e7181867f1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 12 Jun 2018 15:57:45 -0700 Subject: [PATCH 2/3] Update http2.md --- doc/api/http2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 17800162ac81bf..41a557b99c8e32 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2118,7 +2118,7 @@ means that normal JavaScript object methods such as `Object.prototype.toString()` and `Object.prototype.hasOwnProperty()` will not work. -There is following processing done in incoming headers: +For incoming headers: * The `:status` header is converted to `number`. * Duplicates of `:status`, `:method`, `:authority`, `:scheme`, `:path`, `age`, `authorization`, `access-control-allow-credentials`, From 3c93f2609f32d31b1ea22db17ca8c301835dbb3e Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich Date: Thu, 14 Jun 2018 21:14:39 +0200 Subject: [PATCH 3/3] fix review finding - add colon --- doc/api/http2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 41a557b99c8e32..b320e1d632354b 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2132,7 +2132,7 @@ For incoming headers: discarded. * `set-cookie` is a string if present once or an array in case duplicates are present. -* `cookie` the values are joined together with '; '. +* `cookie`: the values are joined together with '; '. * For all other headers, the values are joined together with ', '. ```js