mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #221] DAV server compatible with keeweb #113
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @perrinjerome on GitHub (Jun 2, 2023).
Original GitHub issue: https://github.com/sigoden/dufs/issues/221
Specific Demand
https://github.com/keeweb/keeweb / https://app.keeweb.info/ is a popular web based password manager that can use WebDAV to store password databases files. This cannot be used with dufs as webdav server because of some CORS error.
The first error is that keeweb sends
Cache-Control: no-cacheheader ( here ) and this header is not allowed by theAccess-Control-Allow-Headersfrom dufs. For reference, they are set here1112b936b8/src/server.rs (L1291-L1294)Another error is during saving, keeweb makes a
PUTand then aMOVErequest, with theOverwriteheader set. This is done here by keeweb. ThisOverwriteheader is part of webdav spec ( http://www.webdav.org/specs/rfc2518.html#HEADER_Overwrite ) and this seems a bug that dufs does not allow it.Note that to be used with keeweb, dufs must be running with
--auth-method basicbecause keeweb only uses basic (here.Implement Suggestion
Change
Access-Control-Allow-Headersto allowCache-ControlandOverwrite.Allowing
Overwriteseems natural because it is part of WebDav.Allowing
Cache-Controlis maybe not universally used, but I don't think it's harmful to allow it and this seems "future proof", because the spec recommend using it withIfheader in http://www.webdav.org/specs/rfc2518.html#n-if-header-and-non-dav-compliant-proxies .I'm sending a pull request if you think this makes sense.
@perrinjerome commented on GitHub (Jun 2, 2023):
I can confirm that with 0.34.1 using with keeweb works fine. Thanks a lot @sigoden