- 论坛徽章:
- 2
|
回复 5# lylesong
刚才试了一下:
- $ curl -sI http://qianqian.baidu.com/download/BaiduMusic-12345630.exe | egrep -i '^(HTTP/|Content|Accept-Ranges)'
- HTTP/1.1 200 OK
- Content-Type: application/octet-stream
- Content-Length: 7421120
- Content-Type: application/octet-stream
- Content-Disposition: attachment; filename=BaiduMusic-12345630.exe
- Accept-Ranges: bytes
复制代码 支持Accept-Ranges,并且长度是7421120。
之后用
- $ axel http://qianqian.baidu.com/download/BaiduMusic-12345630.exe
复制代码 下载并且抓到下面一些请求:
GET /download/BaiduMusic-12345630.exe HTTP/1.0
Host: qianqian.baidu.com
Range: bytes=1-
User-Agent: Axel 2.4 (Linux)
HTTP/1.1 206 Partial Content
Server: nginx
Date: Sun, 23 Mar 2014 14:09:26 GMT
Content-Type: application/octet-stream
Content-Length: 7421119
Last-Modified: Wed, 04 Dec 2013 16:05:53 GMT
Connection: close
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=BaiduMusic-12345630.exe
Content-Range: bytes 1-7421119/7421120
GET /download/BaiduMusic-12345630.exe HTTP/1.0
Host: qianqian.baidu.com
Range: bytes=3710561-5565841
User-Agent: Axel 2.4 (Linux)
HTTP/1.1 206 Partial Content
Server: nginx
Date: Sun, 23 Mar 2014 14:09:26 GMT
Content-Type: application/octet-stream
Content-Length: 1855281
Last-Modified: Wed, 04 Dec 2013 16:05:53 GMT
Connection: close
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=BaiduMusic-12345630.exe
Content-Range: bytes 3710561-5565841/7421120
GET /download/BaiduMusic-12345630.exe HTTP/1.0
Host: qianqian.baidu.com
User-Agent: Axel 2.4 (Linux)
HTTP/1.1 200 OK
Server: nginx
Date: Sun, 23 Mar 2014 14:09:26 GMT
Content-Type: application/octet-stream
Content-Length: 7421120
Last-Modified: Wed, 04 Dec 2013 16:05:53 GMT
Connection: close
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=BaiduMusic-12345630.exe
Accept-Ranges: bytes
GET /download/BaiduMusic-12345630.exe HTTP/1.0
Host: qianqian.baidu.com
Range: bytes=5565842-7421119
User-Agent: Axel 2.4 (Linux)
HTTP/1.1 206 Partial Content
Server: nginx
Date: Sun, 23 Mar 2014 14:09:26 GMT
Content-Type: application/octet-stream
Content-Length: 1855278
Last-Modified: Wed, 04 Dec 2013 16:05:53 GMT
Connection: close
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=BaiduMusic-12345630.exe
Content-Range: bytes 5565842-7421119/7421120
GET /download/BaiduMusic-12345630.exe HTTP/1.0
Host: qianqian.baidu.com
Range: bytes=1855280-3710560
User-Agent: Axel 2.4 (Linux)
HTTP/1.1 206 Partial Content
Server: nginx
Date: Sun, 23 Mar 2014 14:09:26 GMT
Content-Type: application/octet-stream
Content-Length: 1855281
Last-Modified: Wed, 04 Dec 2013 16:05:53 GMT
Connection: close
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=BaiduMusic-12345630.exe
Content-Range: bytes 1855280-3710560/7421120
确实第1个请求是Range: bytes=1-。 但后续也有一个没有带Range的请求。
不清楚为什么要这样处理。。。
|
|