I agree with Mark and Carsten. I think from a Maven plugin perspective, the user should be able to "upload" a file, to just about any path they like. The person writing the Maven pom.xml shouldn't need to worry about whether the plugin is using WebDav or a Sling post or any other mechanism and the specifics of how that mechanism does or doesn't work.
Anyone have a strong feeling about either Mark's suggestion of doing MKCOL requests at each level to make sure the path exists, or alternatively Carsten's suggestion of using the Sling POST servlet instead of WebDAV? I think this is worth logging as an enhancement request, does anyone object? Cheers On Apr 5, 2012, at 8:14 AM, Mark Adamcin wrote: > Couldn't the plugin be modified to add an option to use MKCOL requests at > every level of the path prior to executing the PUT request? > > Mark Adamcin > Acquity Group > On Apr 5, 2012 4:01 AM, "Carsten Ziegeler" <[email protected]> wrote: > >> 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] >>
signature.asc
Description: Message signed with OpenPGP using GPGMail
