Skip to main content

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 TypeCodeSectionReference
DATA0x00Section 6.1RFC 9113
HEADERS0x01Section 6.2RFC 9113
PRIORITY0x02Section 6.3RFC 9113
RST_STREAM0x03Section 6.4RFC 9113
SETTINGS0x04Section 6.5RFC 9113
PUSH_PROMISE0x05Section 6.6RFC 9113
PING0x06Section 6.7RFC 9113
GOAWAY0x07Section 6.8RFC 9113
WINDOW_UPDATE0x08Section 6.9RFC 9113
CONTINUATION0x09Section 6.10RFC 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 (设置)

NameCodeInitial ValueSectionReference
SETTINGS_HEADER_TABLE_SIZE0x014096Section 6.5.2RFC 9113
SETTINGS_ENABLE_PUSH0x021Section 6.5.2RFC 9113
SETTINGS_MAX_CONCURRENT_STREAMS0x03(infinite)Section 6.5.2RFC 9113
SETTINGS_INITIAL_WINDOW_SIZE0x0465535Section 6.5.2RFC 9113
SETTINGS_MAX_FRAME_SIZE0x0516384Section 6.5.2RFC 9113
SETTINGS_MAX_HEADER_LIST_SIZE0x06(infinite)Section 6.5.2RFC 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 (错误码)

NameCodeDescriptionSectionReference
NO_ERROR0x00Graceful shutdownSection 7RFC 9113
PROTOCOL_ERROR0x01Protocol error detectedSection 7RFC 9113
INTERNAL_ERROR0x02Implementation faultSection 7RFC 9113
FLOW_CONTROL_ERROR0x03Flow control limits exceededSection 7RFC 9113
SETTINGS_TIMEOUT0x04Settings not acknowledgedSection 7RFC 9113
STREAM_CLOSED0x05Frame received for closed streamSection 7RFC 9113
FRAME_SIZE_ERROR0x06Frame size incorrectSection 7RFC 9113
REFUSED_STREAM0x07Stream not processedSection 7RFC 9113
CANCEL0x08Stream cancelledSection 7RFC 9113
COMPRESSION_ERROR0x09Compression state not updatedSection 7RFC 9113
CONNECT_ERROR0x0aTCP connection error for CONNECT methodSection 7RFC 9113
ENHANCE_YOUR_CALM0x0bProcessing capacity exceededSection 7RFC 9113
INADEQUATE_SECURITY0x0cNegotiated TLS parameters not acceptableSection 7RFC 9113
HTTP_1_1_REQUIRED0x0dUse HTTP/1.1 for the requestSection 7RFC 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.