Subject: Some questions about WebDAV

From: ChunWei Ho <[email-masked]>
Date: Tue, 19 Jul 2005 14:57:37 +0800

Hi,

I just read the WebDAV spec (http://www.webdav.org/specs/rfc2518.html)
and hope I could get some clarifications here :)

(a) The spec example for PROPFIND has the server returning property:
<R:bigbox>
    <R:BoxType>Box type A</R:BoxType>
</R:bigbox>
in response to request for property R:bigbox

Does this mean that "<R:BoxType>Box type A</R:BoxType>" is the
property value? If the server supports setting of arbitary dead
properties, does it have to deal with potential XML substructures like
these as a property value?

(b) The PROPFIND <response>s contain <prop>s grouped by their status.
This sort of grouping is not compulsory? example,

<D:response>
 <D:propstat>
      <D:prop>
           <D:creationdate>Mon, 18 Jul 2005 02:00:24 GMT</D:creationdate>
           <D:lastmodified>Tue, 19 Jul 2005 02:00:24 GMT</D:lastmodified>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
 </D:propstat>
</D:response>

vs
 
<D:response>
 <D:propstat>
      <D:prop>
           <D:creationdate>Mon, 18 Jul 2005 02:00:24 GMT</D:creationdate>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
 </D:propstat>
 <D:propstat>
      <D:prop>
           <D:lastmodified>Tue, 19 Jul 2005 02:00:24 GMT</D:lastmodified>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
 </D:propstat>
</D:response>

(c) The HTTP conditional Ifs (If-Modified-Since, If-Match, etc) are
not applied to the webDAV introduced methods? Even if Depth header is
'0'?

Thanks :) I appreciate your input.

Regards,
CW

---

From: Julian Reschke <[email-masked]>
Date: Tue, 19 Jul 2005 09:33:00 +0200

> these as a property value?

Yes.

>       <D:status>HTTP/1.1 200 OK</D:status>

I wouldn't say grouping is required (although it's nice because it 
reduces the size). Clients shouldn't rely on it though (I've seen at 
least one server not grouping the properties).

Do you think this is something the next spec revision should clarify?

> not applied to the webDAV introduced methods? Even if Depth header is

That's indeed a very good question. I would assume that currently most 
servers do not do this for PROPFIND/COPY and so on, but I think RFC2616 
requires this.

We should collect implementation data (meaning: write test cases) first, 
and then let's discuss what we do about it...

Best regards, Julian

-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

---

From: ChunWei Ho <[email-masked]>
Date: Wed, 20 Jul 2005 23:16:48 +0800

Hi,

I have another question. When the If header (webDAV's If header)
condition is not met, the request should fail with 412 Precondition
Failed. If the request is one over multiple resource, like PROPFIND,
COPY or MOVE over Depth > 0, should the whole request fail returning
412 Precondition Failed, or fail only for the specific resources
returning 207 MultiStatus with some portions giving a 412 Precondition
Failed.

Thanks again for the help! :)

Regards,
CW

On 7/19/05, ChunWei Ho <[email-masked]> wrote:
> Hi,
> 
> Thanks for your prompt reply.
> 
> 
> Non-compulsory grouping was what I gathered from the current XML DTD
> spec itself, but I just wanted to doubly make sure. :)
> 
> >
> The question occurs because I am developing a webdav server (to join
> the legions already out there) by extending an existing HTTP server in
> an educational project. The DELETE method currently supports
> If-conditionals, but the conditionals lose meaning when applied to
> items with depth > 0 (introduced in webdav). Should I continue to
> support If-conditionals for DELETE/MOVE/COPY at depth = 0?
> 
> From the view of the webdav spec itself, the If-conditionals on
> mutation methods like DELETE/MOVE/COPY were meant to prevent a user
> from overwriting something that has changed, but the write locking
> scheme present in webdav already addresses that to some extent i
> guess.
> 
> Regards,
> CW
>

---

From: Julian Reschke <[email-masked]>
Date: Thu, 21 Jul 2005 08:48:29 +0200

Hi,

judging from 
<http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.9.4.p.4>:

"The If header's purpose is to describe a series of state lists. If the 
state of the resource to which the header is applied does not match any 
of the specified state lists then the request MUST fail with a 412 
(Precondition Failed). If one of the described state lists matches the 
state of the resource then the request may succeed."

I would say that the server must return a 412 (so partial 
execution/success of the request is not an option).

Best regards, Julian