/
451.xml
72 lines (63 loc) · 4.11 KB
/
451.xml
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
72
<!DOCTYPE html>
<html lang="en" dir="ltr"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:w="tag:fullstack.wiki,2018:ns/"
xmlns:xht="http://www.w3.org/1999/xhtml/vocab#"
>
<head>
<meta charset="UTF-8" />
<title>451 Unavailable For Legal Reasons</title>
<meta name="description" content="The 451 (Unavailable For Legal Reasons) HTTP status code indicates a resource is inaccessible or censored under threat of legal action." />
<link rel="up" href="index.xml" />
</head>
<body>
<main about="tag:fullstack.wiki,2018:ns/http/status-codes/451" typeof="w:HTTP-StatusCode">
<a rel="http://www.w3.org/1999/xhtml/vocab#describedby" href="" />
<h1>451 Unavailable For Legal Reasons</h1>
<p>451 (Unavailable For Legal Reasons) status code indicates a resource or server is inaccessible or censored under threat of legal action or other great threat against the server operator.</p>
<h2>Writing responses (servers)</h2>
<p>Use <code>451 Unavailable For Legal Reasons</code> if legal authorities have demanded content be taken down under some sort of threat of legal action:</p>
<ul>
<li>DMCA Takedown</li>
</ul>
<p>This can be implemented at a router level, before any resource is dereferenced, or set as a custom status code on a document, similar to handling for <code>410 Gone</code>.</p>
<p>If available, attach a link with the <code>blocked-by</code> link relation, linking to the entity or order blocking the request (see example).</p>
<h2>Reading responses (clients)</h2>
<p>This status indicates the request cannot be filled because of an outstanding legal demand. It can be a result of any aspect of a request, or applied to an entire server, and it does not imply the request would succeed even if the legal demand were lifted. As such, short of Skynet, WOPR, or a similar automated legal response system, there is no way to automatically fix a 451 error.</p>
<aside><p>Even then, a world where computers can automatically leverage any available resources to respond to legal threats may not be pretty or desirable. Please consult extensive expert opinion before attempting to implement this.</p></aside>
<p>The resource might still be available from another party, or in a different legal jurisdiction. If desired, seek the advice of a local lawyer on how you might advise you on the risks and benefits of various courses of action.</p>
<h2>Overview table</h2>
<dl class="inline">
<dt>Name</dt>
<dd property="w:HTTP-StatusCode-value">451</dd>
<dt>Message</dt>
<dd property="w:HTTP-StatusCode-line">451 Unavailable For Legal Reasons</dd>
<dt>Description</dt>
<dd property="w:HTTP-StatusCode-description">The request cannot be filled due to a legal demand.</dd>
<dt>Specification</dt>
<dd property="w:specification"><a href="https://httpwg.org/specs/rfc7725.html">RFC 7725: An HTTP Status Code to Report Legal Obstacles</a></dd>
</dl>
<h2>Examples</h2>
<h3>Specification example</h3>
<pre type="message/http" w:space="indent">
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://spqr.example.org/legislatione>; rel="blocked-by"
Content-Type: text/html
<html>
<head><title>Unavailable For Legal Reasons</title></head>
<body>
<h1>Unavailable For Legal Reasons</h1>
<p>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.</p>
</body>
</html>
</pre>
<h3>GitHub</h3>
<p>GitHub uses the 451 status code when returning pages subject to a DMCA takedown. All pages that would ordinarily return 200 return <code>451 Unavailable for Legal Reasons</code>. Notice how the page links to the request causing the blocked page, and instructions on how to counter-request.</p>
<img src="451-example.svg" style="max-width: 100%;" />
<!-- TODO: If there are any clients that can re-make a request with the correct Content-Type or Content-Encoding, list them here -->
</main>
</body>
</html>