-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve WebDAV compatibility #681
Conversation
The underlying issue will affect other functionality though: sigoden/dufs#400
…ified which happens in the case of dufs (see last commit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not reviewed the code but tested the outcome. This fixes backup/restore with nginx and lighttpd while also offering some compatibility improvements for Dufs. It should broaden compatibility in general. Sounds good to me!
if (code == 400) { | ||
return true | ||
} | ||
// lighttpd returns 403 with <DAV:propfind-finite-depth/> error as if we used infinity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: lighttpd does support Depth: infinity
but the feature is disabled by default since it can be slow on very large directory trees on very slow disks.
Since lighttpd 1.4.56 (released Nov 2020), you can add to lighttpd.conf:
webdav.opts += ("propfind-depth-infinity" => "enable")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to know, but does it also support off-spec stuff like Depth: 2
like SabreDAV?
@t-m-w may be worth re-testing lighttpd with that option enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but does it also support off-spec stuff like Depth: 2 like SabreDAV?
No, lighttpd mod_webdav does not support "off-spec" that I have not seen before. Do you have a reference to SabreDAV doc describing the behavior? (I can guess, but I'd rather not.)
From a (very, very, very quick) grep
of https://github.com/sabre-io/dav, the code comments about Depth: 2
for use with CalDAV. The CalDAV spec is not currently implemented by lighttpd mod_webdav.
However, you can use lighttpd mod_webdav to serve file-backed collections, and you can have lighttpd route CalDAV url-paths back to nextcloud or owncloud sabredav-based backends.
This MR improves compatibility with nginx and lighttpd. It resolves some issues with dufs, but that server still doesn't work for restore due to sigoden/dufs#402
Fixes #673