Range和Content-Range实体头
来源:互联网 发布:java中如果不用static 编辑:程序博客网 时间:2024/06/04 18:27
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-100
***********************************
Range头域可以请求实体的一个或者多个子范围,Range的值为0表示第一个字节,也就是Range计算字节数是从0开始的
表示头500个字节:bytes=0-499
表示第二个500字节:bytes=500-999
表示最后500个字节:bytes=-500
表示500字节以后的范围:bytes=500-
第一个和最后一个字节:bytes=0-0,-1
同时指定几个范围:bytes=500-600,601-999
一般正常回应
***********************************
HTTP/1.1 206 OK
Content-Length: 801
Content-Type: application/octet-stream
Content-Location: http://www.onlinedown.net/hj_index.htm
Content-Range: bytes 0-100/2350 //2350:文件总大小
Last-Modified: Mon, 16 Feb 2009 16:10:12 GMT
Accept-Ranges: bytes
ETag: "d67a4bc5190c91:512"
Server: Microsoft-IIS/6.0
Date: Wed, 18 Feb 2009 07:55:26 GMT
***********************************
注意:如果用户的请求中含有range ,则服务器的相应代码为206。
206 - Partial Content 客户发送了一个带有Range头的GET请求,服务器完成了它(HTTP 1.1新)。
- Range和Content-Range实体头
- range和content-range
- Http头 Range、Content-Range
- Http头 Range、Content-Range
- Http协议头 Range、Content-Range分析
- Http头 Range、Content-Range【断点续传】
- HTTP/1.1 Range和Content-Range
- HTTP/1.1 Range和Content-Range
- HTTP/1.1 Range和Content-Range
- HTTP/1.1 Range和Content-Range
- HTTP/1.1 Range和Content-Range
- 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断点续传原理:http头 Range、Content-Range
- http断点续传原理:http头 Range、Content-Range
- shell编程其实真的很简单(三)
- 学习笔记——JavaWeb过滤器
- table td一行不能超过三个,超过的换行
- [Android新手学习笔记05]-如何进行活动Activity之间的跳转以及数据传递
- 让你尖叫的13种思维方式
- Range和Content-Range实体头
- leetcode 74. Search a 2D Matrix
- how to implement the version control of static files
- java 低版本运行环境执行高版本编译jar包
- 版本控制之git
- 阿里云ECS服务器在Mac下远程配置ftp服务器
- 机器学习(一)win10+python3.5安装numpy+MKL、scipy、matplotlib、scikit-learn
- 小虎OS(XiaoHuOS)打造自己的RTOS,基于stc12c5a60s2(51内核)的可剥夺多任务管理操作系统
- [Android新手学习笔记06]-活动Activity生命周期