Subject: RE: need clarification about COPY to locked resource response cod e

From: "Clemm, Geoff" <[email-masked]>
Date: Sun, 21 Apr 2002 20:40:48 -0400

From: Stefan Eissing [mailto:[email-masked]]

   Instead of a response plain vanilla
   HTTP/1.1 403 LOCKED

   or Julian's
   HTTP/1.1 409 CONFLICT
   <DAV:error><DAV:destination-parent-locked/></DAV:error>

   I would prefer
   HTTP/1.1 207 MultiStatus
   <DAV:multistatus>
      <DAV:response><DAV:href>http://host/destination/parent</DAV:href>
      <DAV:status>HTTP/1.1 403 LOCKED</DAV:status>
      </DAV:response>
      ...
   </DAV:multistatus>

   The problem with this is that for COPY/MOVE, a server would have to
   list all non-copied resources as well in the multistatus. Something
   to be avoided when a precondition for a operation failed.

Section 8.8.3 of RFC 2518 has "error minimization rules" that
require/encourage a server to only return the error once for
a given lock.  So only one such error message would be included.

   So, the best of both worlds would maybe be:
   HTTP/1.1 403 LOCKED
   <DAV:error>
      <DAV:href>http://host/destination/parent</DAV:href>
      <DAV:status>HTTP/1.1 403 LOCKED</DAV:status>
   </DAV:error>

I don't think this degree of divergence from RFC 2518 is warranted/required.
The error minimization rules handle this case reasonably well.

Note: I am neutral as to whether the server returns a 423 LOCKED or a
409 CONFLICT in case an error token is being returned by the server.
One can make reasonable arguments for either behavior (but I
personally would do the latter, i.e. 409 CONLICT).

Cheers,
Geoff

---

From: "Clemm, Geoff" <[email-masked]>
Date: Mon, 22 Apr 2002 09:14:56 -0400

Yes, that was what I meant ... even though I know
that COPY is applied to the object that is not being changed, and
has a header identifying the object that is being changed,
my subconscious keeps wanting it to be the other way (:-).

Cheers,
Geoff

-----Original Message-----
From: Julian Reschke [mailto:[email-masked]]
Sent: Monday, April 22, 2002 9:00 AM
To: Clemm, Geoff; WebDAV
Subject: RE: need clarification about COPY to locked resource response
cod e

Geoff,

I think it sould be the other way around:

- when the source was locked, just report 423 on the source,

- when the source wasn't copied because it's destination was locked, report
409 for the source and throw in a pointer to the locked destination.

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Clemm, Geoff
> Sent: Monday, April 22, 2002 2:54 PM
> To: WebDAV
> Subject: RE: need clarification about COPY to locked resource response
> cod e
>
>
> I'd just do:
> ...
> <D:response>
>    <D:href>/bla/...</D:href>
>    <D:status>HTTP/1.1 409 CONFLICT</D:status>
>    <D:responsedescription>
>      <D:error>
>         <D:locked-source>
>           <D:href>/other/...</D:href>
>         </D:locked-source>
>      </D:error>
>    </D:responsedescription>
> </D:response>
>
> This is assuming the MOVE failed because the source was locked.
> If it failed because the destination was locked, then it would
> just be:
>
> ...
> <D:response>
>    <D:href>/bla/...</D:href>
>    <D:status>HTTP/1.1 423 LOCKED</D:status>
> </D:response>
>
> Cheers,
> Geoff
>
> -----Original Message-----
> Sent: Monday, April 22, 2002 4:06 AM
> To: WebDAV
> Subject: Re: need clarification about COPY to locked resource response
> cod e
>
>
>
> Am Montag den, 22. April 2002, um 02:40, schrieb Clemm, Geoff:
>
> >    From: Julian Reschke [mailto:[email-masked]]
> >
> [...]
> >    - MAY contain response elements for targets that caused the failure.
> >
> > That would be OK with me but I'd prefer to nest the information
> > about targets that caused the failure in the response element for the
> > source resource that wasn't moved/copied/deleted.  This is a change
> > from RFC 2518, but I think it is warranted.
> >
> >    It might be woth thinking to also add some kind of linkage
> > between the
> > two
> >    response elements.
> >
> > I agree.  That is the purpose for nesting the information about the
> > targets that caused the failure in the response for the target that
> > was not copied.
>
> So, as usual I propose a format which will make everyone scream and
> come up with a much better one.
>
> ...
> <D:response>
>    <D:href>/bla/...</D:href>
>    <D:status>HTTP/1.1 409 CONFLICT</D:status>
>    <D:cause>
>      <D:href>/other/...</D:href>
>      <D:status>HTTP/1.1 423 LOCKED</D:status>
>    </D:cause>
> </D:response>
>
> //Stefan
>