11. IANA Considerations (IANA考虑)
本规范为HTTP/2协议建立了多个注册表。本节描述了这些注册表及其相关的注册策略。
11.1. Registration of HTTP/2 Identification Strings (HTTP/2标识字符串的注册)
本文档为HTTP/2协议创建了两个注册:用于识别HTTP/2的字符串"h2"和"h2c"。
"h2"字符串标识通过TLS运行的HTTP/2协议,如Section 3.3中所述。
"h2c"字符串标识通过明文TCP运行的HTTP/2协议,如Section 3.2中所述。
这些标识字符串已在"应用层协议协商(ALPN)协议ID"注册表([TLS-ALPN]中建立)中注册。
11.2. Frame Type Registry (帧类型注册表)
本文档建立了一个用于HTTP/2帧类型代码的注册表。"HTTP/2 Frame Type"注册表管理一个8位空间。"HTTP/2 Frame Type"注册表在"专家审查"策略[RFC8126]下运行,并留有保留值。
新条目的注册需要以下信息:
- Frame Type(帧类型): 用于标识帧类型的名称或标签。
- Code(代码): 8位代码,分配给帧类型。
- Specification(规范): 对包含帧类型定义的规范的引用。
本文档注册的条目可以在Table 1中找到。
Table 1: Frame Types (帧类型)
| Frame Type | Code | Section | Reference |
|---|---|---|---|
| DATA | 0x00 | Section 6.1 | RFC 9113 |
| HEADERS | 0x01 | Section 6.2 | RFC 9113 |
| PRIORITY | 0x02 | Section 6.3 | RFC 9113 |
| RST_STREAM | 0x03 | Section 6.4 | RFC 9113 |
| SETTINGS | 0x04 | Section 6.5 | RFC 9113 |
| PUSH_PROMISE | 0x05 | Section 6.6 | RFC 9113 |
| PING | 0x06 | Section 6.7 | RFC 9113 |
| GOAWAY | 0x07 | Section 6.8 | RFC 9113 |
| WINDOW_UPDATE | 0x08 | Section 6.9 | RFC 9113 |
| CONTINUATION | 0x09 | Section 6.10 | RFC 9113 |
11.3. Settings Registry (设置注册表)
本文档建立了一个用于HTTP/2设置的注册表。"HTTP/2 Settings"注册表管理一个16位空间。"HTTP/2 Settings"注册表在"专家审查"策略[RFC8126]下运行,并留有保留值。
新条目的注册需要以下信息:
- Name(名称): 设置的符号名称。指定设置的名称是可选的。
- Code(代码): 分配给设置的16位代码。
- Initial Value(初始值): 设置的初始值。
- Specification(规范): 对包含设置描述的规范的可选引用。
本文档注册的条目可以在Table 2中找到。
Table 2: Settings (设置)
| Name | Code | Initial Value | Section | Reference |
|---|---|---|---|---|
| SETTINGS_HEADER_TABLE_SIZE | 0x01 | 4096 | Section 6.5.2 | RFC 9113 |
| SETTINGS_ENABLE_PUSH | 0x02 | 1 | Section 6.5.2 | RFC 9113 |
| SETTINGS_MAX_CONCURRENT_STREAMS | 0x03 | (infinite) | Section 6.5.2 | RFC 9113 |
| SETTINGS_INITIAL_WINDOW_SIZE | 0x04 | 65535 | Section 6.5.2 | RFC 9113 |
| SETTINGS_MAX_FRAME_SIZE | 0x05 | 16384 | Section 6.5.2 | RFC 9113 |
| SETTINGS_MAX_HEADER_LIST_SIZE | 0x06 | (infinite) | Section 6.5.2 | RFC 9113 |
11.4. Error Code Registry (错误码注册表)
本文档建立了一个用于HTTP/2错误码的注册表。"HTTP/2 Error Code"注册表管理一个32位空间。"HTTP/2 Error Code"注册表在"专家审查"策略[RFC8126]下运行,并留有保留值。
新条目的注册需要以下信息:
- Name(名称): 错误码的名称。指定错误码的名称是可选的。
- Code(代码): 分配给错误码的32位错误码。
- Description(描述): 错误条件的简要描述。
- Specification(规范): 对定义错误码的规范的可选引用。
本文档注册的条目可以在Table 3中找到。
Table 3: Error Codes (错误码)
| Name | Code | Description | Section | Reference |
|---|---|---|---|---|
| NO_ERROR | 0x00 | Graceful shutdown | Section 7 | RFC 9113 |
| PROTOCOL_ERROR | 0x01 | Protocol error detected | Section 7 | RFC 9113 |
| INTERNAL_ERROR | 0x02 | Implementation fault | Section 7 | RFC 9113 |
| FLOW_CONTROL_ERROR | 0x03 | Flow control limits exceeded | Section 7 | RFC 9113 |
| SETTINGS_TIMEOUT | 0x04 | Settings not acknowledged | Section 7 | RFC 9113 |
| STREAM_CLOSED | 0x05 | Frame received for closed stream | Section 7 | RFC 9113 |
| FRAME_SIZE_ERROR | 0x06 | Frame size incorrect | Section 7 | RFC 9113 |
| REFUSED_STREAM | 0x07 | Stream not processed | Section 7 | RFC 9113 |
| CANCEL | 0x08 | Stream cancelled | Section 7 | RFC 9113 |
| COMPRESSION_ERROR | 0x09 | Compression state not updated | Section 7 | RFC 9113 |
| CONNECT_ERROR | 0x0a | TCP connection error for CONNECT method | Section 7 | RFC 9113 |
| ENHANCE_YOUR_CALM | 0x0b | Processing capacity exceeded | Section 7 | RFC 9113 |
| INADEQUATE_SECURITY | 0x0c | Negotiated TLS parameters not acceptable | Section 7 | RFC 9113 |
| HTTP_1_1_REQUIRED | 0x0d | Use HTTP/1.1 for the request | Section 7 | RFC 9113 |
11.5. HTTP2-Settings Header Field Registration (HTTP2-Settings头字段注册)
本节在"超文本传输协议(HTTP)字段名称注册表"[HTTP]中注册HTTP2-Settings头字段。
- Header field name(头字段名称): HTTP2-Settings
- Applicable protocol(适用协议): http
- Status(状态): standard
- Author/Change controller(作者/变更控制者): IETF
- Specification document(s)(规范文档): Section 3.2.1 of RFC 9113
11.6. PRI Method Registration (PRI方法注册)
本节在"HTTP方法注册表"[HTTP]中注册PRI方法。
- Method Name(方法名称): PRI
- Safe(安全): No
- Idempotent(幂等): No
- Specification document(s)(规范文档): Section 3.4 of RFC 9113
11.7. The 421 (Misdirected Request) HTTP Status Code (421状态码)
本节在"HTTP状态码"注册表[HTTP]中注册421 (Misdirected Request) HTTP状态码。
- Status Code(状态码): 421
- Short Description(简短描述): Misdirected Request
- Specification document(s)(规范文档): Section 9.1.2 of RFC 9113
11.8. The h2c Upgrade Token (h2c升级令牌)
本节在"HTTP Upgrade Token注册表"[HTTP]中注册"h2c"升级令牌。
- Name(名称): h2c
- Description(描述): Hypertext Transfer Protocol version 2 (HTTP/2)
- Expected Version Tokens(预期版本令牌): None
- References(参考): Section 3.2 of RFC 9113
第11章完成!
References
- [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, June 2017.
- [HTTP] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, June 2022.
- [TLS-ALPN] Friedl, S., Popov, A., Langley, A., and E. Stephan, "Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension", RFC 7301, July 2014.