508 迴圈檢測
HTTP 的508 Loop Detected 伺服器錯誤響應 狀態碼錶示整個操作失敗,因為在處理帶有 Depth: infinity 的請求時遇到了無限迴圈。
此狀態可能出現在 Web 分散式創作和版本控制(WebDAV)的上下文中。它被引入作為一種回退機制,用於 WebDAV 客戶端不支援 208 Already Reported 響應(當請求未明確包含 DAV 標頭時)的情況。
狀態
http
508 Loop Detected
規範
| 規範 |
|---|
| RFC 5842 # 第 7.2 節 |
示例
WebDAV 搜尋中的無限迴圈
http
PROPFIND /Coll/ HTTP/1.1
Host: example.com
Depth: infinity
Content-Type: application/xml; charset="utf-8"
Content-Length: 125
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:prop> <D:displayname/> </D:prop>
</D:propfind>
http
HTTP/1.1 508 Loop Detected
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.0
Date: Wed, 15 May 2013 02:38:57 GMT
Content-Length: 72
{
"Message": "Please check the resources for cyclic references and try again."
}