다음을 통해 공유


Client Downloads Content and Properties

Topic Last Modified: 2006-06-12

The following scenario shows the client downloading the contents and properties of a resource:

The client downloads the contents of a document docA using a GET method request and the server returns the contents and resourcetag of document docA.

Request

GET /doccoll/docA HTTP/1.1

Response

HTTP/1.1 200 OK
ResourceTag: <rt:8996592620a48a4393901c9368f7c5180000000014978996592620a48a4393901c9368f7c518000000003db2>
Content-type: text/plain
Content-length: 42

This is the content of text document docA.

The client downloads properties of document docA using a PROPFIND Method request and includes the resourcetag previously obtained in the GET method request. The PROPFIND Method request succeeds only if the resourcetag hasn't changed since the first GET method request, thus allowing the client to check for consistency between properties and content.

Request

PROPFIND /docs/docA HTTP/1.1
Host: example.org
Depth: 1
If: (<rt:8996592620a48a4393901c9368f7c5180000000014978996592620a48a4393901c9368f7c518000000003db2>)
Content-type: text/xml
Content-length: {insert length here}

<?xml version="1.0"?>
<D:propfind xmlns:D="DAV:"
xmlns:R="https://schemas.microsoft.com/repl/">
   <D:props>
      <D:displayname/>
   </D:props>
</D:propfind>

Response

HTTP/1.1 207 Multi-Status
Content-type: text/xml
Content-length: {insert length here}

<?xml version="1.0"?>
<D:multistatus xmlns:D='DAV: '
    xmlns:M="urn:schemas:mail"
    xmlns:R='https://schemas.microsoft.com/repl/'>
   <D:response>
      <D:href>https://server/docs/docA</D:href>
      <D:propstat>
         <D:status>HTTP/1.1 200 OK</D:status>
         <D:prop>
            <D:displayname>Document A</D:displayname>
         </D:prop>
      </D:propstat>
   </D:response>
</D:multistatus>