aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/status/428/index.html
blob: bd8beb567410898f405f9026ca13e5685f62a15d (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
---
title: 428 Precondition Required
slug: Web/HTTP/Status/428
tags:
  - HTTP
  - 客户端错误
  - 状态码
translation_of: Web/HTTP/Status/428
---
<div>{{HTTPSidebar}}</div>

<p>在HTTP协议中,响应状态码  <code><strong>428 Precondition Required</strong></code> 表示服务器端要求发送<a href="/en-US/docs/Web/HTTP/Conditional_requests">条件</a>请求。</p>

<p>一般的,这种情况意味着必要的条件首部——如 {{HTTPHeader("If-Match")}} ——的<strong>缺失。</strong>.</p>

<p>当一个条件首部的值<strong>不能匹配</strong>服务器端的状态的时候,应答的状态码应该是 {{HTTPStatus(412)}} <code>Precondition Failed</code>,前置条件验证失败。</p>

<h2 id="状态">状态</h2>

<pre class="syntaxbox">428 Precondition Required</pre>

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

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("6585", "428 Precondition Required" , "3")}}</td>
   <td>Additional HTTP Status Codes</td>
  </tr>
 </tbody>
</table>

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

<ul>
 <li><a href="/en-US/docs/Web/HTTP/Conditional_requests">HTTP conditional requests</a></li>
 <li>{{HTTPHeader("If-Match")}}</li>
 <li>{{HTTPStatus(412)}}</li>
</ul>