HTTP/2 具体 headers

HTTP/2 specific headers

我在哪里可以找到特定于 http2 的完整指南 headers(:method :status :path 等。)

MDN 上没有任何内容,我找到了描述 HTTP/2 协议的文章,但找不到这些 headers

的完整列表

这些在 HTTP/2 RFC 规范中定义:https://www.rfc-editor.org/rfc/rfc7540

特别是 sections 8.1.2.1 定义了它们是什么:

While HTTP/1.x used the message start-line (see [RFC7230], Section 3.1) to convey the target URI, the method of the request, and the status code for the response, HTTP/2 uses special pseudo-header fields beginning with ':' character (ASCII 0x3a) for this purpose.

Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT generate pseudo-header fields other than those defined in this document.

而在Sections 8.1.2.3 and 8.1.2.4中分别定义了请求和响应的伪头,并列出如下:

请求

  • :方法
  • :方案
  • :权威
  • :路径

回应

  • :状态