aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/glossary/entity_header/index.html
blob: 03a46d59b49401e7b4d8b890b585d74b47a52087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
title: 实体报头
slug: Glossary/Entity_header
tags:
  - 实体报头
translation_of: Glossary/Entity_header
---
<p>实体报头{{glossary("header", "HTTP header")}}用来描述消息体内容。实体报头既可用于请求也可用于响应中。如{{HTTPHeader("Content-Length")}}{{HTTPHeader("Content-Language")}}{{HTTPHeader("Content-Encoding")}}之类的报头都是实体报头。</p>

<p>尽管实体报头既非请求或响应报头,(由于它经常出现在请求头或响应头中)它们通常包含于此类概念中。</p>

<p>在下面例子中,{{HTTPHeader("Content-Length")}}是一个实体报头,而{{HTTPHeader("Host")}}{{HTTPHeader("User-Agent")}}{{glossary("request header", "request headers")}}(请求报头):</p>

<pre>POST /myform.html HTTP/1.1
Host: developer.mozilla.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0
Content-Length: 128</pre>

<h2 id="更多信息">更多信息</h2>

<h3 id="技术知识">技术知识</h3>

<ul>
 <li><a href="/en-US/docs/Web/HTTP/Headers">所有HTTP报头列表</a></li>
</ul>