Subject: correct response code to BIND / REBIND when source is not found?

From: "Tim Olsen" <[email-masked]>
Date: Mon, 14 May 2007 13:38:48 -0400

Hello,

In the case of a BIND or REBIND, what is the correct response code
when the resource specified in the href element is not found?
(preconditions DAV:bind-source-exists and DAV:rebind-source-exists.)
I figure since it's not the Request-URI, the response should not be
404.  I see two options: a 207 Multistatus with an inner status of 404
on the href, or a 409 Conflict.  Any idea which, or if it's a totally
different response code?

Thanks,
Tim

---

From: Julian Reschke <[email-masked]>
Date: Mon, 14 May 2007 20:18:46 +0200

> 404.  I see two options: a 207 Multistatus with an inner status of 404

Right.

> on the href, or a 409 Conflict.  Any idea which, or if it's a totally

First of all, I'd say it's not multistatus.

Then, I think the RFC3253 language on pre/post condition handling 
favorizes 409 (conflict) over 403 (forbidden), as after changing the 
state of some resources, the request could succeed.

Thus:

HTTP/1.1 409 Conflict
Content-Type: application/xml

<error xmlns="DAV:">
   <bind-source-exists/>
</error>

Best regards, Julian

---

From: "Tim Olsen" <[email-masked]>
Date: Mon, 14 May 2007 14:26:23 -0400

> state of some resources, the request could succeed.

In that case, what should the response code be if the Request-URI is
not a collection (precondition DAV:bind-into-collection) ?  I'm
currently thinking this response should be 405 Method Not Allowed.  Or
should it maybe be 409 Conflict?

Thanks for the help!

-Tim