一直很疑惑明明只有一个GET指令,是如何实现多线下载的
刚刚读了一下wget的源代码,终于明白了:
其实相当于这样
$ nc 80
nc: using stream socket
GET /logos/2011/guitar11-hp-sprite.png HTTP/1.1
Range:bytes=100-101
HTTP/1.1 206 Partial Content
Content-Type: image/png
Last-Modified: Thu, 09 Jun 2011 01:11:55 GMT
Date: Fri, 10 Jun 2011 09:17:45 GMT
Expires: Fri, 10 Jun 2011 09:17:45 GMT
Cache-Control: private, max-age=31536000
Content-Range: bytes 100-101/19763
Accept-Ranges: bytes
X-Content-Type-Options: nosniff
Server: sffe
Content-Length: 2
X-XSS-Protection: 1;
mode=block
h
^C
阅读(1516) | 评论(0) | 转发(0) |