412 Precondition Failed |
您所在的位置:网站首页 › 状态码返回412 › 412 Precondition Failed |
With the help of the ETag and the If-Match headers, you can detect mid-air edit collisions. For example, when editing MDN, the current wiki content is hashed and put into an Etag in the response: httpETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"When saving changes to a wiki page (posting data), the POST request will contain the If-Match header containing the ETag values to check freshness against. httpIf-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"If the hashes don't match, it means that the document has been edited in-between and a 412 Precondition Failed error is thrown. |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |