@@ -1929,6 +1929,11 @@ error will be thrown.
19291929<!-- YAML
19301930added: v8.4.0
19311931changes:
1932+ - version: REPLACEME
1933+ pr-url: https://github.com/nodejs/node/pull/29144
1934+ description: The `PADDING_STRATEGY_CALLBACK` has been made equivalent to
1935+ providing `PADDING_STRATEGY_ALIGNED` and `selectPadding`
1936+ has been removed.
19321937 - version: v12.4.0
19331938 pr-url: https://github.com/nodejs/node/pull/27782
19341939 description: The `options` parameter now supports `net.createServer()`
@@ -1975,9 +1980,6 @@ changes:
19751980 * ` http2.constants.PADDING_STRATEGY_MAX ` - Specifies that the maximum
19761981 amount of padding, as determined by the internal implementation, is to
19771982 be applied.
1978- * ` http2.constants.PADDING_STRATEGY_CALLBACK ` - Specifies that the user
1979- provided ` options.selectPadding() ` callback is to be used to determine
1980- the amount of padding.
19811983 * ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
19821984 enough padding to ensure that the total frame length, including the
19831985 9-byte header, is a multiple of 8. For each frame, however, there is a
@@ -1989,9 +1991,6 @@ changes:
19891991 streams for the remote peer as if a ` SETTINGS ` frame had been received. Will
19901992 be overridden if the remote peer sets its own value for
19911993 ` maxConcurrentStreams ` . ** Default:** ` 100 ` .
1992- * ` selectPadding ` {Function} When ` options.paddingStrategy ` is equal to
1993- ` http2.constants.PADDING_STRATEGY_CALLBACK ` , provides the callback function
1994- used to determine the padding. See [ Using ` options.selectPadding() ` ] [ ] .
19951994 * ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
19961995 remote peer upon connection.
19971996 * ` Http1IncomingMessage ` {http.IncomingMessage} Specifies the
@@ -2044,6 +2043,11 @@ server.listen(80);
20442043<!-- YAML
20452044added: v8.4.0
20462045changes:
2046+ - version: REPLACEME
2047+ pr-url: https://github.com/nodejs/node/pull/29144
2048+ description: The `PADDING_STRATEGY_CALLBACK` has been made equivalent to
2049+ providing `PADDING_STRATEGY_ALIGNED` and `selectPadding`
2050+ has been removed.
20472051 - version: v10.12.0
20482052 pr-url: https://github.com/nodejs/node/pull/22956
20492053 description: Added the `origins` option to automatically send an `ORIGIN`
@@ -2090,9 +2094,6 @@ changes:
20902094 * ` http2.constants.PADDING_STRATEGY_MAX ` - Specifies that the maximum
20912095 amount of padding, as determined by the internal implementation, is to
20922096 be applied.
2093- * ` http2.constants.PADDING_STRATEGY_CALLBACK ` - Specifies that the user
2094- provided ` options.selectPadding() ` callback is to be used to determine
2095- the amount of padding.
20962097 * ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
20972098 enough padding to ensure that the total frame length, including the
20982099 9-byte header, is a multiple of 8. For each frame, however, there is a
@@ -2104,9 +2105,6 @@ changes:
21042105 streams for the remote peer as if a ` SETTINGS ` frame had been received. Will
21052106 be overridden if the remote peer sets its own value for
21062107 ` maxConcurrentStreams ` . ** Default:** ` 100 ` .
2107- * ` selectPadding ` {Function} When ` options.paddingStrategy ` is equal to
2108- ` http2.constants.PADDING_STRATEGY_CALLBACK ` , provides the callback function
2109- used to determine the padding. See [ Using ` options.selectPadding() ` ] [ ] .
21102108 * ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
21112109 remote peer upon connection.
21122110 * ...: Any [ ` tls.createServer() ` ] [ ] options can be provided. For
@@ -2146,6 +2144,11 @@ server.listen(80);
21462144<!-- YAML
21472145added: v8.4.0
21482146changes:
2147+ - version: REPLACEME
2148+ pr-url: https://github.com/nodejs/node/pull/29144
2149+ description: The `PADDING_STRATEGY_CALLBACK` has been made equivalent to
2150+ providing `PADDING_STRATEGY_ALIGNED` and `selectPadding`
2151+ has been removed.
21492152 - version: v8.9.3
21502153 pr-url: https://github.com/nodejs/node/pull/17105
21512154 description: Added the `maxOutstandingPings` option with a default limit of
@@ -2191,9 +2194,6 @@ changes:
21912194 * ` http2.constants.PADDING_STRATEGY_MAX ` - Specifies that the maximum
21922195 amount of padding, as determined by the internal implementation, is to
21932196 be applied.
2194- * ` http2.constants.PADDING_STRATEGY_CALLBACK ` - Specifies that the user
2195- provided ` options.selectPadding() ` callback is to be used to determine
2196- the amount of padding.
21972197 * ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
21982198 enough padding to ensure that the total frame length, including the
21992199 9-byte header, is a multiple of 8. For each frame, however, there is a
@@ -2205,9 +2205,6 @@ changes:
22052205 streams for the remote peer as if a ` SETTINGS ` frame had been received. Will
22062206 be overridden if the remote peer sets its own value for
22072207 ` maxConcurrentStreams ` . ** Default:** ` 100 ` .
2208- * ` selectPadding ` {Function} When ` options.paddingStrategy ` is equal to
2209- ` http2.constants.PADDING_STRATEGY_CALLBACK ` , provides the callback function
2210- used to determine the padding. See [ Using ` options.selectPadding() ` ] [ ] .
22112208 * ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
22122209 remote peer upon connection.
22132210 * ` createConnection ` {Function} An optional callback that receives the ` URL `
@@ -2389,30 +2386,6 @@ properties.
23892386
23902387All additional properties on the settings object are ignored.
23912388
2392- ### Using ` options.selectPadding() `
2393-
2394- When ` options.paddingStrategy ` is equal to
2395- ` http2.constants.PADDING_STRATEGY_CALLBACK ` , the HTTP/2 implementation will
2396- consult the ` options.selectPadding() ` callback function, if provided, to
2397- determine the specific amount of padding to use per ` HEADERS ` and ` DATA ` frame.
2398-
2399- The ` options.selectPadding() ` function receives two numeric arguments,
2400- ` frameLen ` and ` maxFrameLen ` and must return a number ` N ` such that
2401- ` frameLen <= N <= maxFrameLen ` .
2402-
2403- ``` js
2404- const http2 = require (' http2' );
2405- const server = http2 .createServer ({
2406- paddingStrategy: http2 .constants .PADDING_STRATEGY_CALLBACK ,
2407- selectPadding (frameLen , maxFrameLen ) {
2408- return maxFrameLen;
2409- }
2410- });
2411- ```
2412-
2413- The ` options.selectPadding() ` function is invoked once for * every* ` HEADERS ` and
2414- ` DATA ` frame. This has a definite noticeable impact on performance.
2415-
24162389### Error Handling
24172390
24182391There are several types of error conditions that may arise when using the
@@ -3498,7 +3471,6 @@ following additional properties:
34983471[ RFC 8441 ] : https://tools.ietf.org/html/rfc8441
34993472[ Readable Stream ] : stream.html#stream_class_stream_readable
35003473[ Stream ] : stream.html#stream_stream
3501- [ Using `options.selectPadding()` ] : #http2_using_options_selectpadding
35023474[ `'checkContinue'` ] : #http2_event_checkcontinue
35033475[ `'connect'` ] : #http2_event_connect
35043476[ `'request'` ] : #http2_event_request
0 commit comments