208 Already Reported
HTTP 208 已报告
成功响应状态码用于 207 多状态
响应中,以节省空间并避免冲突。此响应专门用于 Web 分布式创作和版本控制(WebDAV)的上下文中。
如果以不同的路径多次请求同一资源(例如,作为集合的一部分),则只有第一次请求会以 200
报告。所有其他绑定的响应都将以此 208
状态码报告,因此不会产生冲突,并且响应会更短。
注意:将资源绑定到多个路径的能力是 WebDAV 协议的扩展(Web 应用程序访问 WebDAV 服务器可能会收到此信息)。访问网页的浏览器永远不会遇到此状态码。
状态
http
208 Already Reported
示例
在 207 多状态
响应中收到 208
以下是来自 WebDAV 服务器的示例 207 多状态
响应,其中包含 208
响应。请注意最后一个 <D:status>
元素中的 208
,它表示名为 Loop Demo
的资源已在 207
响应中报告过。
http
HTTP/1.1 207 Multi-Status
Content-Type: application/xml; charset="utf-8"
Content-Length: 1241
<?xml version="1.0" encoding="utf-8" ?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://www.example.com/Coll/</D:href>
<D:propstat>
<D:prop>
<D:displayname>Loop Demo</D:displayname>
<D:resource-id>
<D:href>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf8</D:href>
</D:resource-id>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>http://www.example.com/Coll/Foo</D:href>
<D:propstat>
<D:prop>
<D:displayname>Bird Inventory</D:displayname>
<D:resource-id>
<D:href>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf9</D:href>
</D:resource-id>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>http://www.example.com/Coll/Bar</D:href>
<D:propstat>
<D:prop>
<D:displayname>Loop Demo</D:displayname>
<D:resource-id>
<D:href>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf8</D:href>
</D:resource-id>
</D:prop>
<D:status>HTTP/1.1 208 Already Reported</D:status>
</D:propstat>
</D:response>
</D:multistatus>
规范
规范 |
---|
未知规范 # section-7.1 |