RE: Change to Lock-Token
The goal behind having if-lock is for atomicity. Locks can disappear at
any time for any reason. Having an "if-lock" lets a user say "Only
process this request if my lock is still in force."
In addition I will be proposing advisory locks in the context of
versioning. So users will want to be able to say "Only process this
request if no locks are outstanding on the resource."
> -----Original Message-----
> From: Roy T. Fielding [SMTP:fielding@kiwi.ICS.UCI.EDU]
> Sent: Tuesday, March 25, 1997 9:54 AM
> To: Yaron Goland
> Cc: firstname.lastname@example.org
> Subject: Re: Change to Lock-Token
> >The problem is that e-tags are opaque and we really need to be able
> >put lock tokens into if-match headers. Are we going to be forced to
> >invent our own "if-match" header for lock tokens or can we extend the
> >if-match syntax to accept tokens?
> If what you want to do is say to the server "do this method only if
> resource is still locked with this lock token", then yes you will need
> to define yet another If-* header field. That design decision was
> by the HTTP WG in spite of my vehement objections, as Larry can
> >My feeling is that lock tokens should be URIs (this also gives the
> >possibility of having cross server locks on day, FAR FAR FAR into the
> >future =) and that we should extend the e-tag if headers to accept
> >tokens instead of just quoted strings.
> There is zero chance of extending If-Match or If-None-Match -- they
> not designed to be extensible and cannot be safely changed once
> In any case, making the lock token a URI would not improve
> locks, since either the client would have to ask for the lock on each
> server or the requested server would have to establish the lock in
> a way that it affects the other servers, and thus in a way that allows
> any server to know of the lock and the lock token.
> BTW, why do you need the functionality of If-Lock? Are you treating
> lock token as a credential for authentication?