HTTP2 期望按照顺序打开流
我在官方 HTTP2 规范中没有看到这种说法,但似乎如果您打开 ID 不代表序列号的流,服务器会以 ProtocolError 作为原因以 GoAway 帧进行响应。
示例(无效):
=> HEADER{sid: 3}
=> HEADER{sid: 1}
<= GoAway{ProtoclError}
示例(有效):
=> HEADER{sid: 1}
=> HEADER{sid: 3}
<= ... All good ...
这是为什么?有人可以指出我在规范中的正确部分吗?
I haven't seen this claim in the official HTTP2 spec but it seems that if you open streams with IDs that do not represent sequential numbers, the server responds with a GoAway frame having ProtocolError as a reason.
Example (INVALID):
=> HEADER{sid: 3}
=> HEADER{sid: 1}
<= GoAway{ProtoclError}
Example (VALID):
=> HEADER{sid: 1}
=> HEADER{sid: 3}
<= ... All good ...
Why is that? Can someone point me to the right section in the spec, pelase?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这在 [HTTP/2 规范第 5.1.1 节] 中进行了说明:(https://datatracker.ietf.org/doc/html/rfc7540#section-5.1.1)
This is stated in the [HTTP/2 specification, section 5.1.1]:(https://datatracker.ietf.org/doc/html/rfc7540#section-5.1.1)