aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/server/index.html
blob: a46517b74b700c8c612b0f6448b7e6287a88cdcc (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
title: Server
slug: Web/HTTP/Headers/Server
tags:
  - 安全
  - 服务器
  - 软件
  - 首部
translation_of: Web/HTTP/Headers/Server
---
<div>{{HTTPSidebar}}</div>

<p><code><strong>Server</strong></code> 首部包含了处理请求的源头服务器所用到的软件相关信息。</p>

<p>应该避免使用过长或者过于详细的描述作为 Server 的值,因为这有可能泄露服务器的内部实现细节,有利于攻击者找到或者探测已知的安全漏洞。</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("Response header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>no</td>
  </tr>
 </tbody>
</table>

<h2 id="语法">语法</h2>

<pre class="syntaxbox">Server: &lt;product&gt;
</pre>

<h2 id="指令">指令</h2>

<dl>
 <dt>&lt;product&gt;</dt>
 <dd>处理请求的软件或者产品(或组件产品)的名称。</dd>
</dl>

<h2 id="示例">示例</h2>

<pre>Server: Apache/2.4.1 (Unix)</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("7231", "Server", "7.4.2")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>

<p>{{Compat("http.headers.Server")}}</p>

<h2 id="相关内容">相关内容</h2>

<ul>
 <li>{{HTTPHeader("Allow")}}</li>
</ul>