HTTP 请求头与响应头
📋 HTTP 头字段速查,r0capture 抓到的明文里直接可见。
常见请求头
| 头 | 含义 |
|---|---|
Host | 目标主机(必填) |
User-Agent | 客户端标识 |
Authorization | 认证凭证(Basic/Bearer) |
Cookie | 会话凭证 |
Content-Type | 请求体类型 |
Content-Length | 请求体长度 |
Accept | 期望响应类型 |
Accept-Encoding | 可接受编码(gzip) |
X-Sign / X-Signature | 签名(自定义) |
X-Token | 自定义 token |
X-Timestamp | 时间戳 |
X-Device-Id | 设备指纹 |
常见响应头
| 头 | 含义 |
|---|---|
Content-Type | 响应体类型 |
Content-Length | 响应体长度 |
Content-Encoding | 编码(gzip) |
Set-Cookie | 设置 cookie |
Location | 重定向地址 |
Cache-Control | 缓存策略 |
Server | 服务器软件 |
Content-Type 常见值
| 值 | 含义 |
|---|---|
application/json | JSON |
application/x-www-form-urlencoded | 表单 |
multipart/form-data | 文件上传 |
application/octet-stream | 二进制 |
text/html | HTML |
application/protobuf | Protobuf |
在 r0capture 里
请求头在 SSL_write 明文里,紧跟请求行;响应头在 SSL_read 明文里,紧跟状态行。头与 body 间用空行(\r\n\r\n)分隔。