blob: a3ee29c59c8dc0b9bc2e568e8e40b7428b9537d6 (
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
|
---
title: 408 Request Timeout
slug: Web/HTTP/Status/408
tags:
- 响应状态码
- 客户端错误
translation_of: Web/HTTP/Status/408
---
<div>{{HTTPSidebar}}</div>
<p>响应状态码 <code><strong>408</strong></code><strong><code> Request Timeout</code></strong> 表示服务器想要将没有在使用的连接关闭。一些服务器会在空闲连接上发送此信息,<strong>即便是在客户端没有发送任何请求的情况下</strong>。</p>
<p>服务器应该在此类响应中将 {{HTTPHeader("Connection")}} 首部的值设置为 "close",因为 <code>408</code> 意味着服务器已经决定将连接关闭,而不是继续等待。 </p>
<p>这类响应出现的比较频繁,源于一些浏览器——例如 Chrome, Firefox 27+, 或者 IE9 等——使用 HTTP 协议中的预连接机制来加速上网体验。同时应该注意到,某些服务器会直接关闭连接,而不发送此类消息。</p>
<h2 id="状态">状态</h2>
<pre class="syntaxbox">408 Request Timeout</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", "408 Request Timeout" , "6.5.7")}}</td>
<td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
</tr>
</tbody>
</table>
<h2 id="相关内容">相关内容</h2>
<ul>
<li>{{HTTPHeader("Connection")}}</li>
<li>{{HTTPHeader("X-DNS-Prefetch-Control")}}</li>
</ul>
|