Re: Puzzle: DELETE of a locked collection

Oh. I found Yet Another Bastard Solution.

S9.4.2 specifies that if no Tagged-list matches the resource [URI], then
the If: header should be ignored.

S7.6 simply states that lock tokens must be supplied in an If: header. It
says nothing about them being supplied in a *matching* Tagged-list or
No-tag-list.

Therefore, the following If: header should *always* succeed:

    If: <DAV:just-ignore-this> (<A> <B>)

Good fun, huh?

Okay. So we have found a way to circumvent the *intent* of the spec, but
what is the true answer here? What *should* be the specification?

IMO, the above form is just like submitting a Lock-Token header with a
list of locktokens. We should use the Lock-Token header.

This is not required, but I highly recommend it: also throw out the If:
header. The damn thing is complicated as all hell. I've got a couple
thousand lines of code just to deal with the bugger. And it is *still* not
processing it correctly despite many revisions, refinements, and a couple
people working on it. Call us bad coders, but I like to think it is just
because the thing is too complex and possibly unclearly specified.

Cheers,
-g

On Thu, 13 Apr 2000, Greg Stein wrote:
> I believe that I have an answer to this. The trick is to realize that a
> no-tag-list can specify a set of OR'd states. So the answer is:
> 
> If: (<A>) (<B>) (Not <A>) (Not <B>)
> 
> Ugly, but it basically means that every resource will match something, and
> that the lock token is provided to navigate through the lock.
> 
> Eek.
> 
> -g
> 
> 
> On Thu, 13 Apr 2000, Greg Stein wrote:
> > Consider the following directory structure:
> > 
> >   Collection         [locked with token A, depth=0]
> >    \
> >     SubCollection    [locked with token B, depth=infinity]
> >      \
> >       File1
> >       File2          [these inherit token B]
> >       ...
> >       FileN
> > 
> > 
> > Now, how do you delete SubCollection?
> > 
> > Note that you must provide token A to remove SubCollection from
> > Collection. Also, you must provide token B for SubCollection *and*
> > File1..N.
> > 
> > What's the IF: header look like?
> > 
> > (presume that you cannot delineate all the (recursive) members of
> >  SubCollection and insert them *all* into the IF: header)
> > 
> > I can't see a way to do it. Normally, no-tag-lists are used for specifying
> > locks for a hierarchy. But you must use a tagged-list to specify token A.
> > 
> > Ideas?
> > 
> > Cheers,
> > -g
> > 
> > -- 
> > Greg Stein, http://www.lyra.org/
> > 
> > 
> > 
> 
> -- 
> Greg Stein, http://www.lyra.org/
> 

-- 
Greg Stein, http://www.lyra.org/

Received on Thursday, 13 April 2000 19:10:57 UTC