412 Precondition Failed(先决条件失败)

在 HTTP 协议中,响应状态码 412 Precondition Failed(先决条件失败)表示客户端错误,意味着对于目标资源的访问请求被拒绝。这通常发生于采用除 GETHEAD 之外的方法进行条件请求时,由首部字段 If-Unmodified-SinceIf-None-Match 规定的先决条件不成立的情况下。这时候,请求的操作——通常是上传或修改文件——无法执行,从而返回该错误状态码。

状态码

412 Precondition Failed(先决条件失败)

规范

Specification Title
RFC 7232, section 4.2: 412 Precondition Failed Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support

参见

文档标签和贡献者

标签: 
此页面的贡献者: WayneCui, xgqfrms-GitHub, LangDonHJJ
最后编辑者: WayneCui,