From a6d13b92a3b8a56b6944f851a9927ae5d0c702d5 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sat, 5 Aug 2023 11:32:52 +0000 Subject: [PATCH] http2: addtl http/2 settings Currently, node.js http/2 is limited in sending SETTINGs, that are currently implemented by nghttp2. However, nghttp2 has the ability to send arbitary SETTINGs, that are not known beforehand. This patch adds this feature including a fall back mechanism, if a SETTING is implemented in a later nghttp2 or node version. Fixes: /~https://github.com/nodejs/node/issues/1337 --- lib/internal/http2/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index e7d8f455f2cbfe..74662126f392a4 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -946,7 +946,7 @@ function pingCallback(cb) { // All settings are optional and may be left undefined const validateSettings = hideStackFrames((settings) => { if (settings === undefined) return; - assertIsObject(settings.customSettings, 'customSettings', 'Number'); + assertIsObject.withoutStackTrace(settings.customSettings, 'customSettings', 'Number'); assertWithinRange.withoutStackTrace('headerTableSize', settings.headerTableSize, 0, kMaxInt);