Skip to content

Commit

Permalink
http2: addtl http/2 settings
Browse files Browse the repository at this point in the history
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: nodejs#1337
  • Loading branch information
martenrichter committed Nov 26, 2023
1 parent e1ea8fe commit a6d13b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a6d13b9

Please sign in to comment.