From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/http/headers/content-range/index.html | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 files/zh-cn/web/http/headers/content-range/index.html (limited to 'files/zh-cn/web/http/headers/content-range') diff --git a/files/zh-cn/web/http/headers/content-range/index.html b/files/zh-cn/web/http/headers/content-range/index.html new file mode 100644 index 0000000000..7ec65749f4 --- /dev/null +++ b/files/zh-cn/web/http/headers/content-range/index.html @@ -0,0 +1,87 @@ +--- +title: Content-Range +slug: Web/HTTP/Headers/Content-Range +tags: + - 响应首部 + - 超文本传输协议 + - 首部 +translation_of: Web/HTTP/Headers/Content-Range +--- +
{{HTTPSidebar}}
+ +

在HTTP协议中,响应首部 Content-Range 显示的是一个数据片段在整个文件中的位置。

+ + + + + + + + + + + + + + + + +
Header type{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}no
{{Glossary("Simple response header", "CORS-safelisted response-header")}}no
+ +

语法

+ +
Content-Range: <unit> <range-start>-<range-end>/<size>
+Content-Range: <unit> <range-start>-<range-end>/*
+Content-Range: <unit> */<size>
+ +

指令

+ +
+
<unit>
+
数据区间所采用的单位。通常是字节(byte)。
+
+ +
+
<range-start>
+
一个整数,表示在给定单位下,区间的起始值。
+
<range-end>
+
一个整数,表示在给定单位下,区间的结束值。
+
<size>
+
整个文件的大小(如果大小未知则用"*"表示)。
+
+ +

示例

+ +
Content-Range: bytes 200-1000/67589
+
+ +

规范

+ + + + + + + + + + + + +
SpecificationTitle
{{RFC("7233", "Content-Range", "4.2")}}Hypertext Transfer Protocol (HTTP/1.1): Range Requests
+ +

浏览器兼容性

+ + + +

{{Compat("http.headers.Content-Range")}}

+ +

相关内容

+ + -- cgit v1.2.3-54-g00ecf