HTTPQUERY
한국어

208 Already Reported

사용법

클라이언트가 207 멀티 상태 본문 안에서 208 Already Reported를 받으면, 해당 리소스는 같은 응답의 앞부분에서 이미 기술된 것입니다. 중복 항목에 대해서는 추가 정보가 제공되지 않습니다.

이 상태 코드는 WebDAV Binding Extensions를 위해 특별히 존재합니다. 같은 컬렉션 안에서 여러 위치에 바인딩된 리소스는 한 번은 전체 내용으로, 한 번은 208 Already Reported로 나타나며, Depth: infinity 요청이 자기 자신을 참조하는 리소스를 만났을 때 생길 수 있는 재귀를 끊어 줍니다.

WebDAV 전용

208 Already Reported 상태 코드는 207 멀티 상태 응답 본문 안에서만 나타납니다. 서버가 208을 최상위 HTTP 응답 상태로 보내는 일은 없습니다.

예시

클라이언트가 /main/ 컬렉션을 열거하기 위해 Depth: infinity를 포함한 PROPFIND 요청을 보냅니다. /main/dependent 리소스는 /main/ 자체와 동일한 기반 리소스에 바인딩되어 있습니다.

서버는 먼저 /main/에 대한 전체 정보를 반환한 뒤, 재귀 루프를 끊기 위해 /main/dependent에 대해서는 208 Already Reported를 반환합니다.

요청

PROPFIND /main/ HTTP/1.1
Host: example.com
Depth: infinity
DAV: bind
Content-Type: application/xml; charset="utf-8"
Content-Length: 139

<?xml version="1.0" encoding="utf-8" ?>
<d:propfind xmlns:d="DAV:">
  <d:prop>
    <d:name/>
    <d:link/>
  </d:prop>
</d:propfind>

응답

HTTP/1.1 207 Multi-Status
Content-Type: application/xml; charset="utf-8"
Content-Length: 568

<?xml version="1.0" encoding="utf-8" ?>
<d:multistatus xmlns:d="DAV:">
  <d:response>
    <d:href>http://example.re/main/</d:href>
    <d:propstat>
      <d:prop>
        <d:name>Main Resource</d:name>
        <d:resource-id>
          <href>urn:uuid:1234-0000</href>
        </d:resource-id>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>
      http://example.re/main/dependent
    </d:href>
    <d:propstat>
      <d:prop>
        <d:name>Main Resource</d:name>
        <d:resource-id>
          <href>urn:uuid:1234-0000</href>
        </d:resource-id>
      </d:prop>
      <d:status>
        HTTP/1.1 208 Already Reported
      </d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

코드 참고

.NET

HttpStatusCode.AlreadyReported

Rust

http::StatusCode::ALREADY_REPORTED

Rails

:already_reported

Go

http.StatusAlreadyReported

Symfony

Response::HTTP_ALREADY_REPORTED

Python3.5+

http.HTTPStatus.ALREADY_REPORTED

Apache HttpComponents Core

org.apache.hc.core5.http.HttpStatus.SC_ALREADY_REPORTED

Angular

@angular/common/http/HttpStatusCode.AlreadyReported