查看资源是否支持分片 (https://www.baidu.com)
#方式一
curl -I https://www.baidu.com
#方式二
curl -i --HEAD https://www.baidu.com
### 响应结果 ###
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Connection: keep-alive
Content-Length: 277
Content-Type: text/html
Date: Tue, 30 Jun 2020 07:37:08 GMT
Etag: "575e1f60-115"
Last-Modified: Mon, 13 Jun 2016 02:50:08 GMT
Pragma: no-cache
Server: bfe/1.0.8.18
查看资源分片信息(https://www.baidu.com)
#方式一
curl https://www.baidu.com -r 0-8 -I
#方式二
curl https://www.baidu.com --header "Range: bytes=0-8" -I
### 响应结果 ###
HTTP/1.1 206 Partial Content
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Connection: keep-alive
Content-Length: 9
Content-Range: bytes 0-8/277
Content-Type: text/html
Date: Tue, 30 Jun 2020 08:09:15 GMT
Etag: "575e1f60-115"
Last-Modified: Mon, 13 Jun 2016 02:50:08 GMT
Pragma: no-cache
Server: bfe/1.0.8.18
查看资源分片内容 (https://www.baidu.com)
#方式一
curl https://www.baidu.com -r 0-8
#方式二
curl https://www.baidu.com --header "Range: bytes=0-8"
下载资源分片 (https://www.baidu.com)
#方式一
curl https://www.baidu.com -r 0-8 --output d:/www.baidu.com.html
#方式二
curl https://www.baidu.com --header "Range: bytes=0-8" --output d:/www.baidu.com.html
相关链接
https://cloud.tencent.com/developer/section/1189987
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Range_requests