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

<p><code><strong>451</strong></code><strong><code> Unavailable For Legal Reasons</code></strong> (因法律原因不可用)是一种HTTP协议的错误状态代码,表示服务器由于法律原因,无法提供客户端请求的资源,例如可能会导致法律诉讼的页面。</p>

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

<pre class="syntaxbox">451 Unavailable For Legal Reasons</pre>

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

<p>这个响应示例来自 IETF RFC 规范(见下文),其中提到了英国戏剧电影{{interwiki("wikipedia", "Monty_Python's_Life_of_Brian", "Monty Python's Life of Brian")}} (《蒙提·派森之布莱恩的一生》)。</p>

<p>注意 {{HTTPHeader("Link")}} 首部中可能会包含一个 <code>rel="blocked-by"</code> 字段,用于标明为该资源无法提供负责的主体,例如颁布法令将资源删除的个人或组织的名称。</p>

<pre>HTTP/1.1 451 Unavailable For Legal Reasons
Link: &lt;https://spqr.example.org/legislatione&gt;; rel="blocked-by"
Content-Type: text/html

&lt;html&gt;
&lt;head&gt;&lt;title&gt;Unavailable For Legal Reasons&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Unavailable For Legal Reasons&lt;/h1&gt;
&lt;p&gt;This request may not be serviced in the Roman Province
of Judea due to the Lex Julia Majestatis, which disallows
access to resources hosted on servers deemed to be
operated by the People's Front of Judea.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>

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

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("7725", "451 Unavailable For Legal Reasons")}}</td>
   <td>An HTTP Status Code to Report Legal Obstacles</td>
  </tr>
 </tbody>
</table>

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

<p>{{Compat("http.status.451")}}</p>

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

<ul>
 <li>{{interwiki("wikipedia", "HTTP_451", "Wikipedia: HTTP 451")}}</li>
 <li>{{interwiki("wikipedia", "Fahrenheit_451", "Wikipedia: Fahrenheit 451")}} (which gave this status code its number)</li>
</ul>