- 状态码
- 规范
- 浏览器兼容性
- Legend
- 参见
- 文档标签和贡献者
在 HTTP 协议中,响应状态码 412 Precondition Failed(先决条件失败)表示客户端错误,意味着对于目标资源的访问请求被拒绝。这通常发生于采用除 GET
和 HEAD
之外的方法进行条件请求时,由首部字段 If-Unmodified-Since
或 If-None-Match
规定的先决条件不成立的情况下。这时候,请求的操作——通常是上传或修改文件——无法执行,从而返回该错误状态码。
状态码
- 412 Precondition Failed(先决条件失败)
规范
Specification | Title |
---|---|
RFC 7232, section 4.2: 412 Precondition Failed | Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests |
浏览器兼容性
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
Desktop | Mobile | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | Safari on iOS | Samsung Internet | |
412 | ChromeFull support Yes | EdgeFull support Yes | FirefoxFull support Yes | IEFull support Yes | OperaFull support Yes | SafariFull support Yes | WebView AndroidFull support Yes | Chrome AndroidFull support Yes | Edge MobileFull support Yes | Firefox AndroidFull support Yes | Opera AndroidFull support Yes | Safari iOSFull support Yes | Samsung Internet AndroidFull support Yes |
Legend
- Full support
- Full support
参见
304
If-Unmodified-Since
If-None-Match
428
文档标签和贡献者
标签:
- 错误状态码
此页面的贡献者:mdnwebdocs-bot, WayneCui, xgqfrms-GitHub, LangDonHJJ
最后编辑者:mdnwebdocs-bot,