@@ -1929,6 +1929,11 @@ error will be thrown.
1929
1929
<!-- YAML
1930
1930
added: v8.4.0
1931
1931
changes:
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.
1932
1937
- version: v12.4.0
1933
1938
pr-url: https://github.com/nodejs/node/pull/27782
1934
1939
description: The `options` parameter now supports `net.createServer()`
@@ -1975,9 +1980,6 @@ changes:
1975
1980
* ` http2.constants.PADDING_STRATEGY_MAX ` - Specifies that the maximum
1976
1981
amount of padding, as determined by the internal implementation, is to
1977
1982
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.
1981
1983
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
1982
1984
enough padding to ensure that the total frame length, including the
1983
1985
9-byte header, is a multiple of 8. For each frame, however, there is a
@@ -1989,9 +1991,6 @@ changes:
1989
1991
streams for the remote peer as if a ` SETTINGS ` frame had been received. Will
1990
1992
be overridden if the remote peer sets its own value for
1991
1993
` 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() ` ] [ ] .
1995
1994
* ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
1996
1995
remote peer upon connection.
1997
1996
* ` Http1IncomingMessage ` {http.IncomingMessage} Specifies the
@@ -2044,6 +2043,11 @@ server.listen(80);
2044
2043
<!-- YAML
2045
2044
added: v8.4.0
2046
2045
changes:
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.
2047
2051
- version: v10.12.0
2048
2052
pr-url: https://github.com/nodejs/node/pull/22956
2049
2053
description: Added the `origins` option to automatically send an `ORIGIN`
@@ -2090,9 +2094,6 @@ changes:
2090
2094
* ` http2.constants.PADDING_STRATEGY_MAX ` - Specifies that the maximum
2091
2095
amount of padding, as determined by the internal implementation, is to
2092
2096
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.
2096
2097
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
2097
2098
enough padding to ensure that the total frame length, including the
2098
2099
9-byte header, is a multiple of 8. For each frame, however, there is a
@@ -2104,9 +2105,6 @@ changes:
2104
2105
streams for the remote peer as if a ` SETTINGS ` frame had been received. Will
2105
2106
be overridden if the remote peer sets its own value for
2106
2107
` 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() ` ] [ ] .
2110
2108
* ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
2111
2109
remote peer upon connection.
2112
2110
* ...: Any [ ` tls.createServer() ` ] [ ] options can be provided. For
@@ -2146,6 +2144,11 @@ server.listen(80);
2146
2144
<!-- YAML
2147
2145
added: v8.4.0
2148
2146
changes:
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.
2149
2152
- version: v8.9.3
2150
2153
pr-url: https://github.com/nodejs/node/pull/17105
2151
2154
description: Added the `maxOutstandingPings` option with a default limit of
@@ -2191,9 +2194,6 @@ changes:
2191
2194
* ` http2.constants.PADDING_STRATEGY_MAX ` - Specifies that the maximum
2192
2195
amount of padding, as determined by the internal implementation, is to
2193
2196
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.
2197
2197
* ` http2.constants.PADDING_STRATEGY_ALIGNED ` - Will * attempt* to apply
2198
2198
enough padding to ensure that the total frame length, including the
2199
2199
9-byte header, is a multiple of 8. For each frame, however, there is a
@@ -2205,9 +2205,6 @@ changes:
2205
2205
streams for the remote peer as if a ` SETTINGS ` frame had been received. Will
2206
2206
be overridden if the remote peer sets its own value for
2207
2207
` 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() ` ] [ ] .
2211
2208
* ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
2212
2209
remote peer upon connection.
2213
2210
* ` createConnection ` {Function} An optional callback that receives the ` URL `
@@ -2389,30 +2386,6 @@ properties.
2389
2386
2390
2387
All additional properties on the settings object are ignored.
2391
2388
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
-
2416
2389
### Error Handling
2417
2390
2418
2391
There are several types of error conditions that may arise when using the
@@ -3498,7 +3471,6 @@ following additional properties:
3498
3471
[ RFC 8441 ] : https://tools.ietf.org/html/rfc8441
3499
3472
[ Readable Stream ] : stream.html#stream_class_stream_readable
3500
3473
[ Stream ] : stream.html#stream_stream
3501
- [ Using `options.selectPadding()` ] : #http2_using_options_selectpadding
3502
3474
[ `'checkContinue'` ] : #http2_event_checkcontinue
3503
3475
[ `'connect'` ] : #http2_event_connect
3504
3476
[ `'request'` ] : #http2_event_request
0 commit comments