首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

206 Partial Content

HTTP 206 Partial Content成功状态响应代码指示请求已成功并且主体包含所请求的数据范围,如Range请求标题中所述。

如果只有一个范围,则整个响应Content-Type设置为文档的类型,并提供一个Content-Range

如果发送了几个范围,则Content-Type设置为multipart/byteranges并且每个片段都覆盖一个范围,并且使用Content-RangeContent-Type对其进行描述。

状态

206 Partial Content

示例

包含一个范围的响应:

HTTP/1.1 206 Partial Content
Date: Wed, 15 Nov 2015 06:25:24 GMT
Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT
Content-Range: bytes 21010-47021/47022
Content-Length: 26012
Content-Type: image/gif

... 26012 bytes of partial image data ...

包含以下几个范围的响应:

HTTP/1.1 206 Partial Content
Date: Wed, 15 Nov 2015 06:25:24 GMT
Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT
Content-Length: 1741
Content-Type: multipart/byteranges; boundary=String_separator

--String_separator
Content-Type: application/pdf
Content-Range: bytes 234-639/8000

...the first range...
--String_separator
Content-Type: application/pdf
Content-Range: bytes 4590-7999/8000

...the second range
--String_separator--

规范

规范

标题

RFC 7233,第4.1节:206部分内容

超文本传输​​协议(HTTP / 1.1):范围请求

浏览器兼容性

Feature

Chrome

Firefox

Edge

Internet Explorer

Opera

Safari

Basic Support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Edge mobile

Firefox for Android

IE mobile

Opera Android

iOS Safari

Basic Support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

也可以看看

  • If-Range
  • Range
  • Content-Range
  • Content-Type

扫码关注腾讯云开发者

领取腾讯云代金券