Skip to content

Commit 2860c65

Browse files
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 <jasnell@gmail.com>
1 parent 6bedd4c commit 2860c65

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

doc/api/errors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,12 @@ When setting the priority for an HTTP/2 stream, the stream may be marked as
17101710
a dependency for a parent stream. This error code is used when an attempt is
17111711
made to mark a stream and dependent of itself.
17121712

1713+
<a id="ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS"></a>
1714+
1715+
### `ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS`
1716+
1717+
The number of supported custom settings (10) has been exceeded.
1718+
17131719
<a id="ERR_HTTP2_TOO_MANY_INVALID_FRAMES"></a>
17141720

17151721
### `ERR_HTTP2_TOO_MANY_INVALID_FRAMES`

doc/api/http2.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3010,6 +3010,19 @@ properties.
30103010
meaningful if sent by the server. Once the `enableConnectProtocol` setting
30113011
has been enabled for a given `Http2Session`, it cannot be disabled.
30123012
**Default:** `false`.
3013+
* `customSettings` {Object} Specifies additional settings, yet not implemented
3014+
in node and the underlying libraries. The key of the object defines the
3015+
numeric value of the settings type (as defined in the "HTTP/2 SETTINGS"
3016+
registry established by \[RFC 7540]) and the values the actual numeric value
3017+
of the settings.
3018+
The settings type has to be an integer in the range from 1 to 2^16-1.
3019+
It should not be a settings type already handled by node, i.e. currently
3020+
it should be greater than 6, although it is not an error.
3021+
The values need to be unsigned integers in the range from 0 to 2^32-1.
3022+
Currently, a maximum of up 10 custom settings is supported.
3023+
It is only supported for sending SETTINGS.
3024+
Custom settings are not supported for the functions retrieving remote and
3025+
local settings as nghttp2 does not pass unknown HTTP/2 settings to Node.js.
30133026

30143027
All additional properties on the settings object are ignored.
30153028

0 commit comments

Comments
 (0)