I want a server to push a bunch of content, but I want it to be pushed in order. Obviously, a server can just send things in order, but it would be nice if the server could actually set the stream dependencies (to make it explicit, allow the client to change priorities if it disagrees, etc.). Is this allowed? Specifically I want to send a PUSH_PROMISE immediately followed by a PRIORITY frame to set the promised stream as a dependency of a previous stream.
Excellent question! Not a good answer, but here is what I found:
(8.2.1) "Pushed responses are always associated with an explicit request from the client. The PUSH_PROMISE frames sent by the server are sent on that explicit request's stream. The PUSH_PROMISE frame also includes a promised stream identifier, chosen from the stream identifiers available to the server (see Section 5.1.1)" That is, the PUSH_PROMISE goes with the headers of an origin stream, and then it includes the id of the promised stream. In this way, the new stream depends on the origin stream.
(6.3) Doesn't say who can send a PRIORITY frame, but it refers to 5.3. (5.3) says that only a client can establish a priority as part of a HEADERS frame. The second sentence on that paragraph say that a PRIORITY frame can be used otherwise... by both the client and the server? Not entirely clear, but if I have to bet, I would say that only by the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With