Subject: Why MKCOL/PUT can't automatically create ancestor collections?

From: "Steve K Speicher" <[email-masked]>
Date: Fri, 23 Mar 2001 10:42:48 -0500

I understand that in RFC2518 that it clearly states that for MKCOL "..all
ancestors MUST already exist, or the method MUST fail..."

Why is this?  I can't find the rationale for not allowing the server to
automatically create ancestor collections if needed for PUT/MKCOL request
and return "201 Created".  Just wasn't sure why this is a MUST requirement
instead of a SHOULD, MAY, ...

Thanks,
Steve

---

From: "Lisa Dusseault" <[email-masked]>
Date: Fri, 23 Mar 2001 08:05:59 -0800

My opinion on this is that guessing what the intentions of the client might
be can often go wrong.  The server cannot tell if the user intended to type
"foo/myfile.txt" or "food/myfile.txt" into the dialog box.  Thus, a simple
typo might result in unintended results.  (And with delete permissions
separate from write permissions, the user might not be able to clean up
their mistake).

I'd also point out that a WebDAV client is perfectly capable of doing this
automatically for the user if that is a desirable feature:  the client can
receive the error message and resend a MKCOL followed by the original
request (or the client software may already be aware that the target
directory probably does not exist).  If the server enforces the automatic
creation of the parent directory it takes away the flexibility of the client
to do this or not.

Lisa

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Steve K Speicher
> Sent: Friday, March 23, 2001 7:43 AM
> To: [email-masked]
> Subject: Why MKCOL/PUT can't automatically create ancestor collections?
>
>