Subject: RE: Using If and not failing

From: "Lisa Dusseault" <[email-masked]>
Date: Fri, 31 Jan 2003 22:14:32 -0800

I've been looking into this some more. This trick should also work with
tagged lists.  However, since multiple tagged lists are ANDed together
(" 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") it
has to be done a little differently.

<no-lock> here represents a lock token that the client made up, which is
intended to Fail.
If: <href1> (<locktoken1> Not <no-lock>) <href2> (<locktoken2> Not
<no-lock>)

This evaluates as 
	((href1 matches locktoken1) OR NOT (href1 matches no-lock))
	AND  ((href2 matches locktoken2) OR NOT (href2 matches no-lock))

I tested this against Xythos WFS, and clients can use this syntax to
make sure that the request does not fail even if locktoken1 or
locktoken2 are no longer there.  Of course this should always be used
with ETag checks. 

lisa

> -----Original Message-----
> From: Lisa Dusseault [mailto:[email-masked]] 
> Sent: Thursday, January 23, 2003 12:20 PM
> To: Webdav WG
> Subject: Using If and not failing
> 
> 
> 
>  
> Did anybody point out that there's an interesting way for the 
> client to
> ensure that the If header never fails the request, by always 
> providing a
> "true" statement?
>  
> -          One or more tokens can be put in parentheses to 
> form a group
> or list
> -          Multiple lists can be included and they are ORed together
>  
> So if the client wants to put a bunch of locktokens in the If 
> header it
> can put any number of them in there, all separated by virtual "OR"s:
>  
> DOSTUFF /resourceurl.html HTTP/1.1
> If: (<locktoken1>) (<locktoken2>) (<locktoken3)
>  
> This request will succeed if the any of the clauses match.
> 
> 
> 
>

---

From: "Julian Reschke" <[email-masked]>
Date: Sat, 1 Feb 2003 10:57:35 +0100

Lisa,

you are aware that this exactly the proposal that Geoff and myself have been
making for some months now?

Julian

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

> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Lisa Dusseault
> Sent: Saturday, February 01, 2003 7:15 AM
> To: 'Lisa Dusseault'; 'Webdav WG'
> Subject: RE: Using If and not failing
>
>
>
>

---

From: "Lisa Dusseault" <[email-masked]>
Date: Sat, 1 Feb 2003 11:08:36 -0800

Yes, I am aware it's the same solution in spirit. However, a slight
tweak makes it a little shorter, or in the the untagged list case, quite
a bit shorter.

Your proposal was (mail from Tue 10/8/2002):
  If: <http://www.foo.bar/resource1>
(<locktoken:a-write-lock-token>)(Not <locktoken:a-write-lock-token>))

That's rather long, and it's unnecessary to put a real lock token in the
negative clause.  The client can at least shrink the header a bit using
  If: <http://www.foo.bar/resource1>
(<locktoken:a-write-lock-token>)(Not <no-lock>)

But if the client can get away with using an untagged list production,
it's even shorter:
  If: (<locktoken:a-write-lock-token>) (Not <no-lock>)

RFC2518: "If multiple No-tag-list productions are used then one only
needs to match the state of the resource for the method to be allowed to
continue."

Lisa

> From: Julian Reschke [mailto:[email-masked]] 
> Sent: Saturday, February 01, 2003 1:58 AM
> To: Lisa Dusseault; 'Webdav WG'

---

From: "Julian Reschke" <[email-masked]>
Date: Sat, 1 Feb 2003 20:58:38 +0100

Lisa,

please see:

	http://lists.w3.org/Archives/Public/w3c-dist-auth/2002OctDec/0286.html

:-)

BTW: the token will still need to be a syntactically valid legal, so it MUST
contain a (registered) scheme name, thus the proposal to use "DAV:no-lock".

Julian

> Sent: Saturday, February 01, 2003 8:09 PM
> To: 'Julian Reschke'; 'Webdav WG'