From 2860c6502abb07e8ff8c1ae330fa2184aab20cd4 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Mon, 21 Aug 2023 09:12:00 +0200 Subject: [PATCH] http2: customSettings add documentation Add an explanation to the documentation for Http2Settings to explain the usage of customSettings and its limitations. Co-authored-by: James M Snell --- doc/api/errors.md | 6 ++++++ doc/api/http2.md | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/api/errors.md b/doc/api/errors.md index 38a29a1aae5000..38de652257c0e1 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1710,6 +1710,12 @@ When setting the priority for an HTTP/2 stream, the stream may be marked as a dependency for a parent stream. This error code is used when an attempt is made to mark a stream and dependent of itself. + + +### `ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS` + +The number of supported custom settings (10) has been exceeded. + ### `ERR_HTTP2_TOO_MANY_INVALID_FRAMES` diff --git a/doc/api/http2.md b/doc/api/http2.md index c45e5142ca753c..fea6c9a39acb9f 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3010,6 +3010,19 @@ properties. meaningful if sent by the server. Once the `enableConnectProtocol` setting has been enabled for a given `Http2Session`, it cannot be disabled. **Default:** `false`. +* `customSettings` {Object} Specifies additional settings, yet not implemented + in node and the underlying libraries. The key of the object defines the + numeric value of the settings type (as defined in the "HTTP/2 SETTINGS" + registry established by \[RFC 7540]) and the values the actual numeric value + of the settings. + The settings type has to be an integer in the range from 1 to 2^16-1. + It should not be a settings type already handled by node, i.e. currently + it should be greater than 6, although it is not an error. + The values need to be unsigned integers in the range from 0 to 2^32-1. + Currently, a maximum of up 10 custom settings is supported. + It is only supported for sending SETTINGS. + Custom settings are not supported for the functions retrieving remote and + local settings as nghttp2 does not pass unknown HTTP/2 settings to Node.js. All additional properties on the settings object are ignored.