Javier Godoy | 15 Dec 2011 01:17
Picon
Favicon

About COPY Overwrite:T Depth:0

RFC 4918 section 9.8.4 defines overwrite with Depth:infinity (When a
collection is overwritten, the membership of the destination collection after
the successful COPY request MUST be the  same membership as the source
collection immediately before the COPY), but the exact meaning of an overwrite
copy with Depth:0 is not defined.

I would like to know what is the expected behavior of a COPY with Overwrite:T
and Depth:0? i.e. whether /dst/bar exists or not, after the following methods
are executed in order:

MKCOL /src
MKCOL /src/foo
MKCOL /dst
MKCOL /dst/bar
COPY /src to /dst with Depth:0 and Overwrite:F

>From RFC 4918, section 9.8.3: A COPY of "Depth: 0" only instructs that the
collection and its properties, but not resources identified by its internal
member URLs, are to be copied.

The Litmus test suite (v0.13) does not check this behavior. There is a fork of
Litmus that expects the resource to exists after the Depth:0 copy (test
depth_zero_copy in http://github.com/tolsen/litmus/), but the test suite of
PerlDAV v0.45 takes the opposite approach (test 6_dav_copy_move.t). What is
the correct interpretation?

Best Regards

Javier

(Continue reading)

Werner Baumann | 18 Dec 2011 22:11
Picon

Re: About COPY Overwrite:T Depth:0

Copy with Depth: 0 is one of the fancy ideas of RFC 4918 that was never
seriously defined, just as Collection is mostly undefined.
Copy - with or without Overwrite - of collections only makes sense with
Depths: infinity. Depth 0 or 1 will work when the depth of the tree is
0 or 1 in which case you could use Depth infinity as well. Otherwise
you will get orphaned members or mappings to non-existent members. Or
you create a copy of a collection that isn't a copy because it has a
different list of direct members.

Cheers
Werner

Julian Reschke | 18 Dec 2011 22:58
Picon
Picon

Re: About COPY Overwrite:T Depth:0

On 2011-12-18 22:11, Werner Baumann wrote:
> Copy with Depth: 0 is one of the fancy ideas of RFC 4918 that was never
> seriously defined, just as Collection is mostly undefined.

Well, it's seriously defined, but maybe it needs to be clarified.

WRT collections: what exactly is the problem?

> Copy - with or without Overwrite - of collections only makes sense with
> Depths: infinity. Depth 0 or 1 will work when the depth of the tree is
> 0 or 1 in which case you could use Depth infinity as well. Otherwise

Depth: 1 isn't defined in 4918.

> you will get orphaned members or mappings to non-existent members. Or
> you create a copy of a collection that isn't a copy because it has a
> different list of direct members.

I'm losing you.

The spec says:

"A COPY of "Depth: 0" only instructs that the collection and its 
properties, but not resources identified by its internal member URLs, 
are to be copied."

The problem I can see is that if you read this literally, you'd copy the 
bindings to the member resources, which is unlikely to be intended. 
Sounds like an erratum to me.

(Continue reading)

Javier Godoy | 21 Dec 2011 12:14
Picon
Favicon

Re: About COPY Overwrite:T Depth:0

On 2011-12-18 18:58, Julian Reschke wrote:

>  On 2011-12-18 22:11, Werner Baumann wrote:
> > Copy with Depth: 0 is one of the fancy ideas of RFC 4918 that was never
> > seriously defined, just as Collection is mostly undefined.
>
>  The spec says:
>
>  "A COPY of "Depth: 0" only instructs that the collection and its
> properties, but not resources identified by its internal member URLs, are to
> be copied."
>
>  The problem I can see is that if you read this literally, you'd copy the
> bindings to the member resources, which is unlikely to be intended. Sounds
> like an erratum to me.
>
>  Do you see other problems?

It follows that the requirement in Section 9.8.4 does not hold if Depth is 0:
"when a collection is overwritten, the membership of the destination
collection after the successful COPY request MUST be the same membership as
the source collection immediately before the COPY."

I agree it looks like an erratum.

Best Regards

Javier

(Continue reading)

Manfred Baedke | 21 Dec 2011 13:19
Picon
Favicon

Re: About COPY Overwrite:T Depth:0


On 21.12.11 12:14, Javier Godoy wrote:
> On 2011-12-18 18:58, Julian Reschke wrote:
>
>> On 2011-12-18 22:11, Werner Baumann wrote:
>> > Copy with Depth: 0 is one of the fancy ideas of RFC 4918 that was 
>> never
>> > seriously defined, just as Collection is mostly undefined.
>>
>> The spec says:
>>
>> "A COPY of "Depth: 0" only instructs that the collection and its
>> properties, but not resources identified by its internal member URLs, 
>> are to
>> be copied."
>>
>> The problem I can see is that if you read this literally, you'd copy the
>> bindings to the member resources, which is unlikely to be intended. 
>> Sounds
>> like an erratum to me.
>>
>> Do you see other problems?
>
> It follows that the requirement in Section 9.8.4 does not hold if 
> Depth is 0:
> "when a collection is overwritten, the membership of the destination
> collection after the successful COPY request MUST be the same 
> membership as
> the source collection immediately before the COPY."
>
(Continue reading)


Gmane