From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- files/zh-cn/glossary/http_header/index.html | 76 +++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 files/zh-cn/glossary/http_header/index.html (limited to 'files/zh-cn/glossary/http_header') diff --git a/files/zh-cn/glossary/http_header/index.html b/files/zh-cn/glossary/http_header/index.html new file mode 100644 index 0000000000..a79ef62498 --- /dev/null +++ b/files/zh-cn/glossary/http_header/index.html @@ -0,0 +1,76 @@ +--- +title: HTTP header(HTTP 首部) +slug: Glossary/Header +tags: + - Glossary + - HTTP + - 术语 +translation_of: Glossary/HTTP_header +--- +

HTTP header(HTTP 首部,HTTP 头)表示在 HTTP 请求或响应中的用来传递附加信息的字段,修改所传递的消息(或者消息主体)的语义,或者使其更加精确。消息首部不区分大小写,开始于一行的开头,后面紧跟着一个 ':' 和与之相关的值。字段值在一个换行符(CRLF)前或者整个消息的末尾结束。

+ +

按照惯例,可以把消息首部分为几类,尽管这种划分不存在于任何一份规范文档中:

+ + + +

一个仅包含一个首部的请求:

+ +
GET /example.http HTTP/1.1
+Host: example.com
+
+ +

重定向请求中必须包含 ({{HTTPHeader("Location")}}) 首部:

+ +
302 Found
+Location: /NewPage.html
+
+ +

一些典型的首部:

+ +
304 Not Modified
+Access-Control-Allow-Origin: *
+Age: 2318192
+Cache-Control: public, max-age=315360000
+Connection: keep-alive
+Date: Mon, 18 Jul 2016 16:06:00 GMT
+Server: Apache
+Vary: Accept-Encoding
+Via: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (CloudFront)
+X-Amz-Cf-Id: TOl0FEm6uI4fgLdrKJx0Vao5hpkKGZULYN2TWD2gAWLtr7vlNjTvZw==
+X-Backend-Server: developer6.webapp.scl3.mozilla.com
+X-Cache: Hit from cloudfront
+X-Cache-Info: cached
+
+ + -- cgit v1.2.3-54-g00ecf