| 互联网工程任务组 (IETF) | M. Bishop |
| 请求注释: 9412 | Akamai |
| 类别:标准轨道 | 2023年6月 |
| ISSN: 2070-1721 |
HTTP/3 中的 ORIGIN 扩展
摘要
HTTP/2 的 ORIGIN 帧同样适用于 HTTP/3,但需要单独注册。本文档描述了 HTTP/3 的 ORIGIN 帧。
本备忘录的状态
这是一个互联网标准进程文档。
本文档是互联网工程任务组 (IETF) 的产物。它代表了 IETF 社区的共识。它已接受公开审查并经互联网工程指导小组 (IESG) 批准发布。有关互联网标准的更多信息,请参阅 RFC 7841 第2节。
有关本文档的当前状态、任何勘误以及如何提供反馈的信息,可在 https://www.rfc-editor.org/info/rfc9412 获取。
Copyright Notice
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.
1. 简介
[ORIGIN] 定义了 HTTP/2 的 ORIGIN 帧,用于指示在给定连接上可用的 origin(源)。它定义了一种单一的 HTTP/2 帧类型。
1.1. 符号约定
本文档中关键字 “MUST”、“MUST NOT”、“REQUIRED”、“SHALL”、“SHALL NOT”、“SHOULD”、“SHOULD NOT”、 “RECOMMENDED”、“NOT RECOMMENDED”、“MAY” 和 “OPTIONAL” 应按 BCP 14 中的定义解释(见 [RFC2119] 和 [RFC8174]),仅当这些单词全部以大写形式出现时按此解释。
本文档中的帧图使用 第 1.3 节 定义的格式(见 [QUIC-TRANSPORT]),用于说明字段的顺序和大小。
2. HTTP/3 的 ORIGIN 帧
ORIGIN HTTP/3 帧允许服务器指示其希望客户端将哪些 origin(源)[RFC6454] 视为该连接内 Origin 集合(见 RFC 8336 第 2.3 节)的一个或多个成员。
帧负载的语义与 [ORIGIN] 中定义的 HTTP/2 帧的语义相同。HTTP/2 将流 0 保留用于与连接状态相关的帧,而 HTTP/3 为此定义了一对称为“控制流”的单向流。
在 [ORIGIN] 中表明 ORIGIN 帧在流 0 上发送的地方,应将其解释为 HTTP/3 的控制流:即 ORIGIN 帧由服务器在其控制流上发送给客户端。
HTTP/3 在通用帧布局中未定义 Flags 字段。由于尚未为 ORIGIN 帧定义任何标志,本规范不定义在 HTTP/3 中传达此类标志的机制。
2.1. 帧布局
ORIGIN 帧的布局与 HTTP/2 中使用的布局几乎相同;此处为清晰起见重述这些信息。ORIGIN 帧类型为 0x0c(十进制 12),与 HTTP/2 相同。负载包含零个或多个 Origin-Entry 字段实例。
HTTP/3 Origin-Entry {
Origin-Len (16),
ASCII-Origin (..),
}
HTTP/3 ORIGIN Frame {
Type (i) = 0x0c,
Length (i),
Origin-Entry (..) ...,
}
图 1:ORIGIN 帧布局
Origin-Entry 是一个长度定界的字符串。具体地,它包含两个字段:
3. 安全性考虑
4. IANA 注意事项
本文档在 [HTTP/3] 定义的 “HTTP/3 Frame Types” 注册表中注册了一个帧类型,该注册表位于 <https://www.iana.org/assignments/http3-parameters/>。
- Value:
-
0x0c
- Frame Type:
-
ORIGIN
- Status:
-
permanent
- Reference:
- Date:
-
2023-03-14
- Change Controller:
-
IETF
- Contact:
-
HTTP WG <ietf-http-wg@w3.org>
5. 参考文献
5.1. 规范性参考文献
- [HTTP/2]
- Thomson, M., Ed. 和 C. Benfield, Ed., “HTTP/2”, RFC 9113, DOI 10.17487/RFC9113, 2022 年 6 月, <https://www.rfc-editor.org/info/rfc9113>.
- [HTTP/3]
- Bishop, M., Ed., “HTTP/3”, RFC 9114, DOI 10.17487/RFC9114, 2022 年 6 月, <https://www.rfc-editor.org/info/rfc9114>.
- [ORIGIN]
- Nottingham, M. 和 E. Nygren, “The ORIGIN HTTP/2 Frame”, RFC 8336, DOI 10.17487/RFC8336, 2018 年 3 月, <https://www.rfc-editor.org/info/rfc8336>.
- [RFC2119]
- Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, DOI 10.17487/RFC2119, 1997 年 3 月, <https://www.rfc-editor.org/info/rfc2119>.
- [RFC8174]
- Leiba, B., “Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words”, BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2017 年 5 月, <https://www.rfc-editor.org/info/rfc8174>.
5.2. 补充参考文献
- [QUIC-TRANSPORT]
- Iyengar, J., Ed. 和 M. Thomson, Ed., “QUIC: A UDP-Based Multiplexed and Secure Transport”, RFC 9000, DOI 10.17487/RFC9000, 2021 年 5 月, <https://www.rfc-editor.org/info/rfc9000>.
- [RFC6454]
- Barth, A., “The Web Origin Concept”, RFC 6454, DOI 10.17487/RFC6454, 2011 年 12 月, <https://www.rfc-editor.org/info/rfc6454>.