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

<p><code><strong>426 Upgrade Required</strong></code> 是一种HTTP协议的错误状态代码,表示服务器拒绝处理客户端使用当前协议发送的请求,但是可以接受其使用升级后的协议发送的请求。</p>

<p>服务器会在响应中使用 {{HTTPHeader("Upgrade")}} 首部来指定要求的协议。</p>

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

<pre class="syntaxbox">426 Upgrade Required</pre>

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

<pre>HTTP/1.1 426 Upgrade Required
Upgrade: HTTP/3.0
Connection: Upgrade
Content-Length: 53
Content-Type: text/plain

This service requires use of the HTTP/3.0 protocol</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", "426 Upgrade Required" , "6.5.15")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
  </tr>
 </tbody>
</table>

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

<ul>
 <li>{{HTTPHeader("Upgrade")}}</li>
 <li>{{HTTPStatus("101")}} <code>Switching Protocol</code></li>
</ul>