[PR #417] fix: Prevent recursive creation of parent directories #6835

Closed
opened 2026-05-31 00:15:34 +03:00 by zhus · 0 comments
Owner

Original Pull Request: https://github.com/sigoden/dufs/pull/417

State: closed
Merged: No


The specification of WebDAV (RFC4818) does not allow recursive creation of parent directories.

During MKCOL processing, a server MUST make the Request-URI an
internal member of its parent collection, unless the Request-URI is
"/". If no such ancestor exists, the method MUST fail. 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 /a/b/c/ does not exist, the request must fail.1

The feature to create all parent recursively when uploading, moving or copying a file has been removed and instead a check has been introduced to see if the directory exists. If not, 409 CONFLICT is returned in accordance with RFC4818.

**Original Pull Request:** https://github.com/sigoden/dufs/pull/417 **State:** closed **Merged:** No --- The specification of WebDAV (RFC4818) does not allow recursive creation of parent directories. > During MKCOL processing, a server MUST make the Request-URI an > internal member of its parent collection, unless the Request-URI is > "/". If no such ancestor exists, the method MUST fail. 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 /a/b/c/ does not exist, the request must fail.[^1] The feature to create all parent recursively when uploading, moving or copying a file has been removed and instead a check has been introduced to see if the directory exists. If not, 409 CONFLICT is returned in accordance with RFC4818. [^1]: https://datatracker.ietf.org/doc/html/rfc4918#section-9.3
zhus added the pull-request label 2026-05-31 00:15:34 +03:00
zhus closed this issue 2026-05-31 00:15:35 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#6835