Maybe we could do a POST and let the Post-Servlet handle this? This
would be independent from WebDav then.

Carsten

2012/4/5 Bertrand Delacretaz <[email protected]>:
>> On Wed, Apr 4, 2012 at 5:16 PM, Craig S. Dickson 
>> <[email protected]>wrote:
>>> ...Is PUT'ing to a
>>> non-existent path not considered semantically correct from a REST
>>> standpoint? Or, is this just a bug or missing feature?...
>
> PUT is handled by Sling's WebDAV servlet, and
> http://www.webdav.org/specs/rfc2518.html says (about MKCOL):
>
> "When the MKCOL operation creates a new collection resource, all
> ancestors must already exist, or the method must fail with a 409
> (Conflict) status code. For example, if a request to create collection
> /a/b/c/d/ is made, and neither /a/b/ nor /a/b/c/ exists, the request
> must fail."
>
> The PUT section of that spec is a bit less understandable IMO:
>
> "A PUT that would result in the creation of a resource without an
> appropriately scoped parent collection must fail with a 409
> (Conflict)."
>
> but between the two it seems that 409 is correct when PUTting to a
> path that doesn't exist.
>
> -Bertrand



-- 
Carsten Ziegeler
[email protected]

Reply via email to