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

状态

  1. 451 Unavailable For Legal Reasons

示例

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

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

  1. HTTP/1.1 451 Unavailable For Legal Reasons
  2. Link: <https://spqr.example.org/legislatione>; rel="blocked-by"
  3. Content-Type: text/html
  4.  
  5. <html>
  6. <head><title>Unavailable For Legal Reasons</title></head>
  7. <body>
  8. <h1>Unavailable For Legal Reasons</h1>
  9. <p>This request may not be serviced in the Roman Province
  10. of Judea due to the Lex Julia Majestatis, which disallows
  11. access to resources hosted on servers deemed to be
  12. operated by the People's Front of Judea.</p>
  13. </body>
  14. </html>

规范

SpecificationTitle
RFC 7725: 451 Unavailable For Legal ReasonsAn HTTP Status Code to Report Legal Obstacles

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

Update compatibility data on GitHub

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
451ChromeFull support YesEdgeFull support YesFirefoxFull support YesIEFull support YesOperaFull support YesSafariFull support YesWebView AndroidFull support YesChrome AndroidFull support YesEdge MobileFull support YesFirefox AndroidFull support YesOpera AndroidFull support YesSafari iOSFull support YesSamsung Internet AndroidFull support Yes

Legend

  • Full support
  • Full support

相关内容

文档标签和贡献者

标签:

此页面的贡献者:mdnwebdocs-bot, WayneCui

最后编辑者:mdnwebdocs-bot,