Skip to content

Commit cfd8c2a

Browse files
sebdeckersgibfahn
authored andcommitted
doc: remove http2 pushStream weight option
The PRIORITY field is only supported by HTTP/2 in a HEADERS frame initiated by the client, not in a push request sent by the server. Documents the recommended approach to set a silent priority as used internally by nghttp2. PR-URL: #16451 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
1 parent 01ceed0 commit cfd8c2a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/api/http2.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -989,9 +989,6 @@ added: v8.4.0
989989
Defaults to `false`.
990990
* `parent` {number} Specifies the numeric identifier of a stream the newly
991991
created stream is dependent on.
992-
* `weight` {number} Specifies the relative dependency of a stream in relation
993-
to other streams with the same `parent`. The value is a number between `1`
994-
and `256` (inclusive).
995992
* `callback` {Function} Callback that is called once the push stream has been
996993
initiated.
997994
* Returns: {undefined}
@@ -1012,6 +1009,10 @@ server.on('stream', (stream) => {
10121009
});
10131010
```
10141011

1012+
Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass
1013+
a `weight` value to `http2stream.priority` with the `silent` option set to
1014+
`true` to enable server-side bandwidth balancing between concurrent streams.
1015+
10151016
#### http2stream.respond([headers[, options]])
10161017
<!-- YAML
10171018
added: v8.4.0

0 commit comments

Comments
 (0)