| 名称 | Range |
|---|---|
| 作用 | 请求部分字节 |
| 规范 | RFC 9110 §14.2 |
| 响应 | 206 + Content-Range;多区间时 multipart/byteranges;不支持则回 200 全量 |
单区间与多区间请求
单区间与多区间请求
curl -si -r 0-999 https://download.example.com/f.bin | grep -i content-range
# Content-Range: bytes 0-999/1048576
curl -si -H 'Range: bytes=0-99,200-299' https://download.example.com/f.bin | grep -i content-type
# Content-Type: multipart/byteranges; boundary=…Range 与 If-Range 配合可在资源变更时自动退回全量下载;服务器可忽略 Range(返回 200),客户端要能接受。