Skip to content

Commit

Permalink
doc: remove http2 pushStream weight option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sebdeckers authored and apapirovski committed Oct 27, 2017
1 parent c66e555 commit a0f7ae6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,6 @@ added: v8.4.0
Defaults to `false`.
* `parent` {number} Specifies the numeric identifier of a stream the newly
created stream is dependent on.
* `weight` {number} Specifies the relative dependency of a stream in relation
to other streams with the same `parent`. The value is a number between `1`
and `256` (inclusive).
* `callback` {Function} Callback that is called once the push stream has been
initiated.
* Returns: {undefined}
Expand All @@ -1012,6 +1009,10 @@ server.on('stream', (stream) => {
});
```

Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass
a `weight` value to `http2stream.priority` with the `silent` option set to
`true` to enable server-side bandwidth balancing between concurrent streams.

#### http2stream.respond([headers[, options]])
<!-- YAML
added: v8.4.0
Expand Down

0 comments on commit a0f7ae6

Please sign in to comment.