]> OzVa Git service - ozva-cloud/commit
fix: status code for MKCOL on existing resource (#142)
authorAneesh Agrawal <aneeshusa@gmail.com>
Thu, 10 Nov 2022 10:41:10 +0000 (05:41 -0500)
committerGitHub <noreply@github.com>
Thu, 10 Nov 2022 10:41:10 +0000 (18:41 +0800)
commit604ccc655606319029687c278180d078bd133666
tree90f1d508786da3a7b47ca144fb6fd4cc1f53e6ba
parent1a9990f04e5a0aaefb330873f8daece896a0f2ad
fix: status code for MKCOL on existing resource (#142)

* Fix status code for MKCOL on existing resource

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.

* add test

Co-authored-by: sigoden <sigoden@gmail.com>
src/server.rs
tests/webdav.rs