一、HEAD HPACK压缩协议格式说明,HPACK压缩的二进制格式采用以下2种格式:
1、用索引标识头域,如下所示,0位固定为1,其它7bit标识索引值,索引参考下面的静态表格,如82代表 -> :method: GET。
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| 1 | Index (7+) |
+---+---------------------------+
Figure 5: Indexed Header Field
+-------+-----------------------------+---------------+
| Index | Header Name | Header Value |
+-------+-----------------------------+---------------+
| 1 | :authority | |
| 2 | :method | GET |
| 3 | :method | POST |
| 4 | :path | / |
| 5 | :path | /index.html |
| 6 | :scheme | http |
| 7 | :scheme | https |
| 8 | :status | 200 |
| 9 | :status | 204 |
| 10 | :status | 206 |
| 11 | :status | 304 |
| 12 | :status | 400 |
| 13 | :status | 404 |
| 14 | :status | 500 |
| 15 | accept-charset | |
| 16 | accept-encoding | gzip, deflate |
| 17 | accept-language | |
| 18 | accept-ranges | |
| 19 | accept | &

本文深入解析HTTP2协议中的报文头和数据帧格式,详细阐述了HEAD HPACK压缩协议,包括索引标识头域和字符头域表示法,并提供实例分析,展示了HTTP2数据帧中Huffman编码的应用。
最低0.47元/天 解锁文章
5万+

被折叠的 条评论
为什么被折叠?



