跳到主要内容

Appendix A. 静态表 (Static Table)

此表通过分析 2018 年的实际 Internet 流量生成, 在过滤掉一些不受支持和非标准的值之后, 纳入了最常见的 header fields. 由于这种方法, QPACK static table 中缺少一些最常见的 header fields, 原因如下.

"accept-encoding" header 未出现在 static table 中, 因为它的值很可能对每个客户端都是唯一的; 如果 encoder 可以根据应用上下文选择要索引的内容, dynamic table 空间会得到更好的利用.

以下 header fields 在语料中很常见, 但没有出现在 static table 中, 因为它们在 HTTP/3 中经过熵编码, 因而不再显式传输: ":authority", ":method", ":path", ":scheme" 和 ":status".

"user-agent" header 相对常见, 是 static table 的良好候选项. 但是, 它的值变化很大, 放入 static table 的价值很小; 与 "accept-encoding" 一样, 如果 encoder 可以选择要索引的内容, dynamic table 空间会得到更好的利用.

"content-length" header 也未出现在此 static table 中, 因为它的值通常对每个响应都是唯一的, 纳入 static table 几乎没有收益.

QPACK static table 由预定义的 99 个 field line 列表组成, 每个 field line 都有一个固定索引, 范围为 0-98.

IndexNameValue
0:authority
1:path/
2age0
3content-disposition
4content-length0
5cookie
6date
7etag
8if-modified-since
9if-none-match
10last-modified
11link
12location
13referer
14set-cookie
15:methodCONNECT
16:methodDELETE
17:methodGET
18:methodHEAD
19:methodOPTIONS
20:methodPOST
21:methodPUT
22:schemehttp
23:schemehttps
24:status103
25:status200
26:status304
27:status404
28:status503
29accept*/*
30acceptapplication/dns-message
31accept-encodinggzip, deflate, br
32accept-rangesbytes
33access-control-allow-headerscache-control
34access-control-allow-headerscontent-type
35access-control-allow-origin*
36cache-controlmax-age=0
37cache-controlmax-age=2592000
38cache-controlmax-age=604800
39cache-controlno-cache
40cache-controlno-store
41cache-controlpublic, max-age=31536000
42content-encodingbr
43content-encodinggzip
44content-typeapplication/dns-message
45content-typeapplication/javascript
46content-typeapplication/json
47content-typeapplication/x-www-form-urlencoded
48content-typeimage/gif
49content-typeimage/jpeg
50content-typeimage/png
51content-typetext/css
52content-typetext/html; charset=utf-8
53content-typetext/plain
54content-typetext/plain;charset=utf-8
55rangebytes=0-
56strict-transport-securitymax-age=31536000
57strict-transport-securitymax-age=31536000; includesubdomains
58strict-transport-securitymax-age=31536000; includesubdomains; preload
59varyaccept-encoding
60varyorigin
61x-content-type-optionsnosniff
62x-xss-protection1; mode=block
63:status100
64:status204
65:status206
66:status302
67:status400
68:status403
69:status421
70:status425
71:status500
72accept-language
73access-control-allow-credentialsFALSE
74access-control-allow-credentialsTRUE
75access-control-allow-headers*
76access-control-allow-methodsget
77access-control-allow-methodsget, post, options
78access-control-allow-methodsoptions
79access-control-expose-headerscontent-length
80access-control-request-headerscontent-type
81access-control-request-methodget
82access-control-request-methodpost
83alt-svcclear
84authorization
85content-security-policyscript-src 'none'; object-src 'none'; base-uri 'none'
86early-data1
87expect-ct
88forwarded
89if-range
90origin
91purposeprefetch
92server
93timing-allow-origin*
94upgrade-insecure-requests1
95user-agent
96x-forwarded-for
97x-frame-optionsdeny
98x-frame-optionssameorigin