HTTP 206 Partial Content
成功狀態碼表明請求成功,且主體包含在請求標頭Range
中所指定的資料區間。
若只包含一個區間,則整個回應的 Content-Type
將會被設為該文件的類型 ,且會包含一個 Content-Range
標頭。
若有多個區間,則整個回應的 Content-Type
會被設為 multipart/byteranges
,且每個分段會對應一個區間,並有 Content-Range
及 Content-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--
規範
Specification | Title |
---|---|
RFC 7233, section 4.1: 206 Partial Content | Hypertext Transfer Protocol (HTTP/1.1): Range Requests |
瀏覽器相容性
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
206 | Chrome Full support Yes | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
Legend
- Full support
- Full support