[PR #142] [MERGED] Fix status code for MKCOL on existing resource #488

Closed
opened 2026-04-08 16:53:08 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/142
Author: @aneeshusa
Created: 11/9/2022
Status: Merged
Merged: 11/10/2022
Merged by: @sigoden

Base: mainHead: fix-status-code-for-mkcol-on-existing-resource


📝 Commits (2)

  • 828d4d7 Fix status code for MKCOL on existing resource
  • e6bdf22 add test

📊 Changes

2 files changed (+11 additions, -1 deletions)

View changed files

📝 src/server.rs (+4 -1)
📝 tests/webdav.rs (+7 -0)

📄 Description

Per https://datatracker.ietf.org/doc/html/rfc4918#section-9.3.1,
MKCOL should return a 405 if the resource already exists.

Impetus for this change:
I am using dufs as a webdav server for Joplin
which interpreted the previous behavior of returning a 403 as an error,
preventing syncing from working.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigoden/dufs/pull/142 **Author:** [@aneeshusa](https://github.com/aneeshusa) **Created:** 11/9/2022 **Status:** ✅ Merged **Merged:** 11/10/2022 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `fix-status-code-for-mkcol-on-existing-resource` --- ### 📝 Commits (2) - [`828d4d7`](https://github.com/sigoden/dufs/commit/828d4d71ef10db223c185e4da9c917b3773eb74f) Fix status code for MKCOL on existing resource - [`e6bdf22`](https://github.com/sigoden/dufs/commit/e6bdf222fe0d44aeee18dbb70f209a80b70f43eb) add test ### 📊 Changes **2 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/server.rs` (+4 -1) 📝 `tests/webdav.rs` (+7 -0) </details> ### 📄 Description Per https://datatracker.ietf.org/doc/html/rfc4918#section-9.3.1, MKCOL should return a 405 if the resource already exists. Impetus for this change: I am using dufs as a webdav server for [Joplin](https://joplinapp.org/) which interpreted the previous behavior of returning a 403 as an error, preventing syncing from working. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-04-08 16:53:08 +03:00
zhus closed this issue 2026-04-08 16:53:08 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#488