Http头 Range、Content-Range(http断点续传原理)
2013-08-07 14:33
351 查看
HTTP头中一般断点下载时才用到Range和Content-Range实体头,
Range用户请求头中,指定第一个字节的位置和最后一个字节的位置,如(Range:200-300)
Content-Range用于响应头
请求下载整个文件:
GET /test.rar HTTP/1.1
Connection: close
Host: 116.1.219.219
Range: bytes=0-801 //一般请求下载整个文件是bytes=0- 或不用这个头
一般正常回应
HTTP/1.1 200 OK
Content-Length: 801
Content-Type: application/octet-stream
Content-Range: bytes 0-800/801 //801:文件总大小
Range用户请求头中,指定第一个字节的位置和最后一个字节的位置,如(Range:200-300)
Content-Range用于响应头
请求下载整个文件:
GET /test.rar HTTP/1.1
Connection: close
Host: 116.1.219.219
Range: bytes=0-801 //一般请求下载整个文件是bytes=0- 或不用这个头
一般正常回应
HTTP/1.1 200 OK
Content-Length: 801
Content-Type: application/octet-stream
Content-Range: bytes 0-800/801 //801:文件总大小
相关文章推荐
- http断点续传原理:http头 Range、Content-Range
- http断点续传原理:http头 Range、Content-Range
- http断点续传原理:http头 Range、Content-Range
- http断点续传原理:http头 Range、Content-Range
- http断点续传原理:http头 Range、Content-Range
- 断点续传原理 :http头 Range , Content-Range
- http断点续传原理:http头 Range、Content-Range
- http断点续传原理:http头 Range、Content-Range
- http断点续传原理:http头Range 、 Content-Range
- Http头 Range、Content-Range【断点续传】
- 图解:HTTP 范围请求,助力断点续传、多线程下载的核心原理
- http断点续传原理:http头 Range、Content-Range
- Content-Range HTTP 下载文件原理
- http 断点续传原理
- HTTP断点续传原理
- http下载原理/断点续传方法
- HTTP断点续传原理及PHP实现 https://github.com/xfdipzone/11.FileDownload
- 关于http断点续传相关的RANGE这个header
- 关于http断点续传相关的RANGE这个header
- JAVA 实现 HTTP 断点续传及原理